错误号码1130:Host 'XXX' is not allowed to connect to this MySQL server

今天在linux机器上装了一个mysql,想通过sqlyog远程连接过去,发生了:错误号码1130:Host 'XXX' is not allowed to connect to this MySQL server

错误号码1130:Host 'XXX' is not allowed to connect to this MySQL server

问题原因:mysql未开启mysql远程访问权限。

解决办法:

在linux机器上登录mysql,修改mysql的user表。

(1)查询需要修改的记录

select host, user, password from user where host='localhost' and user='root';

(2)更新

update user set host='%' where host='localhost' and user='root';

(3)刷新权限

FLUSH PRIVILEGES;

错误号码1130:Host 'XXX' is not allowed to connect to this MySQL server

经过以上的步骤就可以解决了远程的问题

错误号码1130:Host 'XXX' is not allowed to connect to this MySQL server

但是linux本地登录还行吗?   ---  不行了

错误号码1130:Host 'XXX' is not allowed to connect to this MySQL server

那么这个很容易解决,我们在sqlyog下给user表添加一条支持本地登录的记录即可

错误号码1130:Host 'XXX' is not allowed to connect to this MySQL server

然后执行刷新权限的命令即可

错误号码1130:Host 'XXX' is not allowed to connect to this MySQL server

本地登录测试

错误号码1130:Host 'XXX' is not allowed to connect to this MySQL server

上一篇:mysql 错误号码1129


下一篇:MySQL错误日志总结