关于权限相关的一些操作

grant select on *.* to za@localhost;

revoke select on *.* to za@localhost;

grant all privileges on *.* to z1@localhost;

grant all privileges *.* to z1@localhost with grant option;

grant all privileges *.* to z1@localhost identified by '123456' with grant option;

grant select ,insert ,update,delete on test1.* to '用户名'@'主机名' identified by '123';

grant super,process,file on *.* to '用户名'@'主机名';(因为这几个权限都属于管理权限,因此不能够指定了某个数据库,on后面必须跟*.*)

show grants for '用户名'@'主机名';

 

posted on 2014-08-21 10:25  zitong  阅读(160)  评论(0编辑  收藏  举报