您的位置:首页 > 数据库 > MySQL

MySQL远程连接:Host 'x' is not allowed to connect to this MySQL server

2016-05-18 18:00 393 查看
远程连接MySQL时发现如下错误:

java.sql.SQLException: null,  message from server: "Host '192.168.30.23' is not allowed to connect to this MySQL server"


解决方法:

进入MySQL的bin目录,执行如下命令:

mysql -u root -proot
mysql> user mysql;
mysql> update user set host = '%' where user = 'root';
mysql> flush privileges;




作者:itmyhome
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: