首页 > 数据库技术 > 详细

MYSQL添加远程用户或允许远程访问

时间:2015-05-19 12:21:33      阅读:303      评论:0      收藏:0      [点我收藏+]

使用 root 用户登录: 

使用 grant 语句:

1、添加一个用户admin并授权通过本地机(localhost)访问,密码"something"

mysql>grant all privileges on *.* to admin@localhost identified by ‘something‘ with grant option;

2、添加一个用户admin并授权可从任何其它主机发起的访问(通配符%)

mysql>grant all privileges on *.* to admin@"%" identified by ‘something‘ with grant option;

3、刷新权限列表

mysql>flush privileges;

MYSQL添加远程用户或允许远程访问

原文:http://www.cnblogs.com/pan1308/p/4514095.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!