1,首先更改ssh配置,可以是ssh端口连接不上服务器 cd /etc/ssh/sshd_config vi !$ Port 52113 //ssh默认的连接端口, 改为别人不知道的端口 PermitRootLogin no //root用户都知道的,静止远程登录 PermitEmptyPasswords no //禁止空密码登录 UseDNS no //不使用DNS加入之后,/etc/init.d/sshd restart netstat -lnt 查看端口,或者lsof -i :52113
Linux开启MySQL远程连接的设置步骤 . MySQL默认root用户只能本地访问,不能远程连接管理MySQL数据库,那么Linux下如何开启MySQL远程连接?设置步骤如下: 1.GRANT命令创建远程连接mysql授权用户test mysql -u root -p mysql>GRANT ALL PRIVILEGES ON *.* TO test@localhost IDENTIFIED BY 'test' WITH GRANT OPTION; mysql>GRANT ALL PRIV
Linux 对mysql远程连接的授权操作 首先linux连接mysql数据库 授权: grant all on *.* to ' with grant option; //允许账户root从任何主机连接到所有数据库(*.*) grant all on test.* to ' with grant option; //允许账户user从任何主机连接到test数据库(test.*) 释放远程授权: revoke all on *.* from 'user'@'%'; //禁止用户user从任何主机