问题

今天刚安装的MySQL数据库,远程无法连接,报错如下

null, message from server: "Host 'xxx.192.223.177' is not allowed to connect to this MySQL server"

解决

  • mysql -uroot -p 输入密码
  • show databases;
  • use mysql;
  • select user, host form user;//可以看到user为root,host为localhost的话,说明mysql只允许本机连接,那么外网,本地软件客户端就无法连接了。
  • update user set host = '%' where user='root';
  • flush privileges;//刷新权限

相关文章:

  • 2022-03-01
  • 2021-06-22
  • 2022-12-23
  • 2021-10-26
  • 2021-04-12
  • 2022-02-01
  • 2022-01-10
猜你喜欢
  • 2021-10-19
  • 2021-11-16
  • 2021-09-10
  • 2021-12-12
  • 2021-07-14
  • 2021-11-09
  • 2022-12-23
相关资源
相似解决方案