码迷,mamicode.com
首页 > 数据库 > 详细

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

时间:2017-09-28 13:02:42      阅读:141      评论:0      收藏:0      [点我收藏+]

标签:设置   flush   登陆   grant   mysq   sql   远程   admin   option   

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;

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

标签:设置   flush   登陆   grant   mysq   sql   远程   admin   option   

原文地址:http://www.cnblogs.com/huiy/p/7605814.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!