mysql 通过IP登录 报:1130 is not allowed to connect to this MySQL server

报错如图:

 

服务器上登录MySQL之后:

mysql> use mysql;
设置对外开放ip,让windows的Navicat可以连接上来,然后刷新,注意,记得开放云服务器端口,在云的安全组里面
mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> update user set host = '%' where user = 'root';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

posted @ 2024-06-24 09:03  寻水的鱼001  阅读(14)  评论(0)    收藏  举报