mysql创建新用户并授权访问操作该数据库

时间:2017-06-19 21:51:09   收藏:0   阅读:312



1.mysql -uroot -p

2.输入密码:

3.update mysql.user set authentication_string=password(‘123456‘) where user=‘oneuser‘ and Host = ‘%‘;

4.grant all privileges on onetable.* to oneuser@‘%‘ identified by ‘123456‘;

5.flush privileges;


然后外部连接数据库。


原文:http://phpervip.blog.51cto.com/11075781/1939902

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!