300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > MySql中连接出现 1130-Host ‘LAPTOP-AKP8DH1F’ is not allowed to connect to this MySQL server 的解决方法

MySql中连接出现 1130-Host ‘LAPTOP-AKP8DH1F’ is not allowed to connect to this MySQL server 的解决方法

时间:2020-03-24 21:20:42

相关推荐

MySql中连接出现 1130-Host ‘LAPTOP-AKP8DH1F’ is not allowed to connect to this MySQL server 的解决方法

一、错误

在用Navicat配置远程连接Mysql数据库时遇到如下报错信息,这是由于Mysql配置了不支持远程连接引起的。

二、在安装Mysql数据库的主机上登录root用户。

mysql -u root -p

三、依次执行如下命令。

use mysql;

select host from user where user='root';

四、执行update user set host = ‘%’ where user ='root’将Host设置为通配符%。

Host设置了“%”后便可以允许远程访问。

update user set host='%' where user='root';

五、Host修改完成后记得执行flush privilegs使配置立即生效。

flush privileges;

六、完成以上操作后,再试尝试远程连接Mysql,报错信息消失。如果再次连接出现2059报错信息,可以参考以下经验解决。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。