最近在配置Nngix负载均衡,在做后端数据库服务器同步的时候,发现了这个问题。即安装了Mysql,然后用 telnet ip 3306,端口后报
Host is not allowed to connect to this MySQL serverConnection closed by foreign ,虽然自己以前也碰到过,后来解决了,但是觉得还是值得贴出来,估计会有很多人同样碰到过,
解决办法:
>UPDATE mysql.user SET Host='%' WHERE Host='localhost';
mysql>GRANT ALL PRIVILEGES ON *.* TO root@"%" ;
mysql>FLUSH PRIVILEGES;
阅读(1695) | 评论(0) | 转发(0) |