远程连接Mysql服务器的数据库,错误代码是
1130,ERROR 1130: Host xxx.xxx.xxx.xxx is not allowed to connect to this MySQL server
null, message from server: "Host 'DESKTOP-J2IEVTN' is not allowed to connect to this MySQL server"
查了半天资料是无法给远程连接的用户权限。
1.mysql -u root -p
输入mysql密码
2.mysql;use mysql;
3.mysql;select 'host' from user where user='root';
4.mysql;update user set host = '%' where user ='root';
5.mysql;flush privileges;
6.mysql;select 'host' from user where user='root';
null, message from server: "Host 'DESKTOP-J2IEVTN' is not allowed to connect to this MySQL server"
查了半天资料是无法给远程连接的用户权限。
1.mysql -u root -p
输入mysql密码
2.mysql;use mysql;
3.mysql;select 'host' from user where user='root';
4.mysql;update user set host = '%' where user ='root';
5.mysql;flush privileges;
6.mysql;select 'host' from user where user='root';