当前位置:Gxlcms > 数据库问题 > Mysql连接报错:1130-host ... is not allowed to connect to this MySql server如何处理

Mysql连接报错:1130-host ... is not allowed to connect to this MySql server如何处理

时间:2021-07-01 10:21:17 帮助过:45人阅读

1、登录数据库:mysql -u root -p

技术分享图片

2、查看当前所有数据库:show databases;  并进入mysql数据库

技术分享图片技术分享图片

3、查看mysql数据库中所有的表:show tables;  并查看user表中的数据:select host, user from user;

技术分享图片技术分享图片

4、删除多余主机:delete from user where host = ‘127.0.0.1‘ or host = ‘::1‘;  修改user表中的host:update user set host=‘%‘ where user=‘root‘;

 技术分享图片技术分享图片

技术分享图片

5、最后刷新一下:flush privileges;

技术分享图片

 

Mysql连接报错:1130-host ... is not allowed to connect to this MySql server如何处理

标签:data   let   host   bubuko   tab   主机   登录   .com   sele   

人气教程排行