mysql 远程链接出错问题

当安装好mysql后,想经过远程链接,出现ERROR 1130 (HY000): Host '***' is not allowed to connect to this MySQL server的解决办法。mysql

  1. 经过本地链接进入mysql:在cmd下输入mysql -h localhost -uroot -p******
  2. 执行"use mysql;",回车;
  3. 执行"update mysql.user set Host='%' where Host = 'localhost';"
  4. 执行"grant all privileges on *.* to root@"%";"
  5. 执行"flush privileges;",大功告成。
相关文章
相关标签/搜索