欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

MySQL远程连接失败

程序员文章站 2022-05-28 12:20:34
...

错误提示“ERROR 1130: Host '192.168.1.3' is not allowed to connect to this MySQL server”
可能是你的帐号不允许从远程登陆,只能localhost连接,解决方法,先用“localhost”方式建立连接,然后在“查询”中输入SQL语句

use mysql;
update user set host = '%' where user = 'root';
select host, user from user;
flush privileges
相关标签: MySQL 远程连接