今天在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

 

相关文章:

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