1130 - Host '210.13.127.73' is not allowed to connect to this MySQL server,MySql连接拒绝不允许连接

问题描述:

在 阿里 centos 7.5 装好mysql后 通过Navicat 连接报错

1130 - Host '210.13.127.73' is not allowed to connect to this MySQL server

问题解决: 

修改mysql权限表 

1.登陆MySql 进入MySql数据库

mysql -u root -p

use mysql

2.查看root的host的权限配置

 select host from user where user='root';

3.修改root的权限 将Host设置为通配符%

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

这里解释下为什么这么修改(Host列指定了允许用户登录所使用的IP,比如user=root Host=192.168.1.1。这里的意思就是说root用户只能通过192.168.1.1的客户端去访问。 user=root Host=localhost,表示只能通过本机客户端去访问。而%是个通配符,如果Host=192.168.1.%,那么就表示只要是IP地址前缀为“192.168.1.”的客户端都可以连接。如果Host=%,表示所有IP都有连接权限。)

执行update 有报错这里不用管,接着执行 flush privileges;刷新MySQL的系统权限相关表

flush privileges;

最后Navicat 再次连接 成功!

#退出MySql
exit

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章