MySQL 1130-Host is not allowed to connect this MySQL server

安装之后用的IP登录,会报错(localhost不会)

MySQL 1130-Host is not allowed to connect this MySQL server

解决方案一:

用localhost连接,找到mysql这张表的user,修改root的host值为%

MySQL 1130-Host is not allowed to connect this MySQL server

然后重启mysql:

如果出现这个错误先进入bin目录进行安装

net stop mysql

服务名无效。

请键入 NET HELPMSG 2185 以获得更多的帮助。

1

2

3

4

安装步骤:

MySQL 1130-Host is not allowed to connect this MySQL server

如果发生以下错误请使用管理员运行:

MySQL 1130-Host is not allowed to connect this MySQL server

因为我这边mysql关不掉,然后我就重启了电脑,重启后可以用IP正常连接啦!

MySQL 1130-Host is not allowed to connect this MySQL server

解决方案二:

先登录

mysql -u root -p

Enter password:输入自己的密码

1

2

3

然后更改root的host值

mysql>use mysql;

mysql>select host from user where user='root';

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

mysql>flush privileges;

mysql>select host from user where user='root';

1

2

3

4

5

6

7

8

9

这样也可以解决,实际操作是一样的,就是修改了user表中root的host值

相关推荐