MySQL - Host is not allowed to connect to this MySQL server解决方法

先说说这个错误,其实就是我们的MySQL不允许远程登录,所以远程登录失败了,解决方法如下:

  • 在装有MySQL的机器上登录MySQL mysql -u root -p密码
  • 执行use mysql;
  • 执行update user set host = ‘%’ where user = ‘root’;这一句执行完可能会报错,不用管它。
  • 执行FLUSH PRIVILEGES;
发布了48 篇原创文章 · 获赞 0 · 访问量 343

猜你喜欢

转载自blog.csdn.net/qq_21389693/article/details/105712546