1、登录mysql
2、选择数据库mysql
3、设置远程访问,参考很多资料,大概有2种,没一一测试,我一般用授权法
1)、改表法
update user set host = '%' where user = 'root';
2)、 授权法,ps:[]好像可以加或者不加,我加了
grant all privileges on *.* to root@'%' identified by '密码' [WITH GRANT OPTION];
flush privileges;
mysql设置远程访问
最新推荐文章于 2024-08-15 11:56:37 发布