mysql 创建用户并授权

创建用户并授权
---------------------------------------------------------
grant all privileges on *.* to 'www'@'localhost' identified by '123456';  #授权www,所有操作,所有表权限
grant all privileges on *.* to 'navicat'@'%' identified by '123456';  #授权navicat,所有操作,所有表,所有主机权限
flush privileges; #刷新

show grants for 'www'@'localhost';   #查看权限
DROP USER 'www'@'host';

posted @ 2018-04-02 17:19  yulamp  阅读(137)  评论(0编辑  收藏  举报