mysql设置远程访问

来源:互联网 发布:极客学院python百度云 编辑:程序博客网 时间:2024/05/22 13:04

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;

0 0
原创粉丝点击