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

Posted 老黄Hwy

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Mysql连接报错:1130-host ... is not allowed to connect to this MySql server如何处理相关的知识,希望对你有一定的参考价值。

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如何处理的主要内容,如果未能解决你的问题,请参考以下文章

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

Mysql远程连接报错

MySQL连接报错

Host ‘211.141.227.150‘ is not allowed to connect to this MySQL server

Host ‘211.141.227.150‘ is not allowed to connect to this MySQL server

远程连接mysql报错:1130 - Host XXX is not allowed to connect to this MySQL server