mysql远程连接报错Host is not allowed to connect to this MySQL server

参考:https://blog.csdn.net/bingjianit/article/details/54384299

在远程服务器装了个mysql,远程连接出错,记录解决方法


  1. 在装有MySQL的机器上登录MySQL mysql -u root -p密码
  2. 执行use mysql;
  3. 执行update user set host = '%' where user = 'root';这一句执行完可能会报错,不用管它。
  4. 执行FLUSH PRIVILEGES;


猜你喜欢

转载自blog.csdn.net/qq_20367813/article/details/80158838