mysql提示Host is not allowed to connect to this MySQL server的解决方法

这篇文章主要讲解了“mysql提示Host is not allowed to connect to this MySQL server的解决方法”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“mysql提示Host is not allowed to connect to this MySQL server的解决方法”吧!

  1. 在装有MySQL的机器上登录MySQL mysql -u root -p密码

  2. 执行use mysql;

  3. 执行update user set host = '%' where user = 'root';这一句执行完可能会报错,不用管它。

  4. 执行FLUSH PRIVILEGES;

感谢各位的阅读,以上就是“mysql提示Host is not allowed to connect to this MySQL server的解决方法”的内容了,经过本文的学习后,相信大家对mysql提示Host is not allowed to connect to this MySQL server的解决方法这一问题有了更深刻的体会,具体使用情况还需要大家实践验证。这里是亿速云,小编将为大家推送更多相关知识点的文章,欢迎关注!