美文网首页
mysql创建用户并赋予权限

mysql创建用户并赋予权限

作者: lyhwbt | 来源:发表于2018-08-24 14:55 被阅读0次

登录

mysql -u root -p

添加用户

create user 'test'@'%' identified by '123456'

分配权限( 注意 引号 和 ` )

grant all privileges on `testdb`.* to 'test'@'localhost' identified by '123456';

刷新授权

flush privileges;

相关文章

网友评论

      本文标题:mysql创建用户并赋予权限

      本文链接:https://www.haomeiwen.com/subject/olnbiftx.html