在用Navicat配置远程连接Mysql数据库时,报错

“1130 - Host XXX is not allowed to connect to this MySQL server”解决办法

原因:这是由于Mysql配置了不支持远程连接引起的

解决方法:

在安装Mysql数据库的主机上登录root用户,执行以下命令:

1.登录root用户:mysql -u root -p

2.查看主机的配置信息:use mysql;

select host from user where user='root';

3.Host设置为通配符%:update user set host = '%' where user ='root'

4.修改完成后,使配置立即生效:flush privilegs

“1130 - Host XXX is not allowed to connect to this MySQL server”解决办法

使用navicat 成功连接至mysql。

PS: root连接成功,若使用其他账号连接失败,报错:access denied for user ...

“1130 - Host XXX is not allowed to connect to this MySQL server”解决办法

则需要修改该用户对用的Host值,如下:

“1130 - Host XXX is not allowed to connect to this MySQL server”解决办法

使用此账号再次连接,成功

“1130 - Host XXX is not allowed to connect to this MySQL server”解决办法

 

相关文章:

  • 2021-06-11
  • 2021-11-26
  • 2021-05-08
  • 2022-12-23
  • 2021-06-05
  • 2022-01-14
  • 2021-08-13
猜你喜欢
  • 2021-04-03
  • 2021-08-20
  • 2021-05-01
  • 2022-12-23
  • 2022-01-27
相关资源
相似解决方案