(转载)mysql:设置mysql的远程访问

1.登陆Mysql
mysql -u root -p
2.允许任何IP访问,其中密码为admin
grant all privileges on *.* to root@"%" identified by "admin" with grant option;
3.允许特定IP访问,其中密码为admin
grant all privileges on *.* to root@"192.168.0.1" identified by "passw0rd" with grant option; flush privileges;

posted @ 2017-09-28 11:19  huiy_小溪  阅读(147)  评论(0编辑  收藏  举报