0
点赞
收藏
分享

微信扫一扫

host is not allowed to connect to this MySQL server

爱我中华8898 2022-11-07 阅读 133


(1)修改表。可能是你的帐号不允许从远程登陆,只能在localhost。这个时候只要在localhost的那台电脑,登入mysql后,更改 “mysql” 数据库里的 “user” 表里的 “host” 项,从"localhost"改称"%"

mysql -u root -p

按照提示输入密码

mysql>use mysql;

mysql>update user set host = ‘%’ where user = ‘root’;

(2)修改完后执行如下SQL命令

flush privileges


举报

相关推荐

0 条评论