MySQL添加允许登录IP
2018-04-03 16:29:27
910次阅读
0个评论
1. 测试是否允许远程连接
$ telnet 192.168.1.8 3306
host 192.168.1.4 is not allowed to connect to this mysql server
2. 允许特定客户端 ip 地址连接
$ mysql -u root -p
Enter password:
mysql> use mysql
mysql> GRANT ALL ON *.* to root@'192.168.1.4' IDENTIFIED BY 'your-root-password';
mysql> FLUSH PRIVILEGES;
注意: your-root-password 填写你的服务器 mysql 的密码
00