一、问题
二、解决方案
前提条件,:要先确认被访问的电脑防火墙关闭:
控制面板-系统与安全-Windows Defender 防火墙-关闭-确定
一、问题
连接非本地数据库时,输入对方ip、账号和密码后点击连接测试,报错:
ERROR 1130: Host 192.168.3.100 is not allowed to connect to this MySQL server
二、解决方案
1.在本地先被连接的登录数据库
2.使用show databases;命令查看被连接的数据库列表,发现有个名叫mysqlr的表:
3.使用use mysql;命令,使用mysql数据库
4.使用show tables;命令,查看发现里面有张叫做user的表
5.使用select host from user where user = ‘root’;命令,查看用户root在表中的host字段值(查看结果为localhost)
使用update user set host = ‘%’ where user = ‘root’;命令,把这个值改成‘%’
改完之后再次查询发现更改成功
6.使用flush privileges;命令刷新系统权限
7.退出窗口,再次连接,就连接成功了。
- MySQL 解决方案 allowed connect 数据库mysql解决方案allowed connect allowed connect server mysql mysql权限allowed connect server message allowed connect reply not_allowed connection reply-code connection数据库 数据mysql 错误allowed connect mariadb max_allowed_packet allowed packet mysql retrieval allowed mysql8 public mysql管理工具 实例allowed