mysql用户创建、授权

时间:2014-07-21 10:39:07   收藏:0   阅读:291
#test表示你要建立的用户名,后面的123表示密码
#用户可以在任何地方登陆
mysql> create user test identified by‘123‘;
#限制在固定地址登陆
mysql> create user test@localhost identified by ‘123‘;

#格式:grant select on 数据库.* to 用户名@登录主机 identified by "密码"
mysql> grant all on *.* to user@localhost
mysql> grant select,insert,update,delete on *.* to test@"%" identified by "123";
mysql> flush privileges;




mysql用户创建、授权,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!