mysql授权,撤销权限

talk is cheap,shou me code

举一个例子

crate database mail;

create table users(

id int primary key,

username varchar(60) not null,

passwd char(32) not null

)

授予mailauthor 数据库mail的增删查改权限

grant select,insert,delete,update

on mail.*

to mailauthor@localhost identified by "password";

收回权限删除
 revoke delete on mail.* from mailauthor@localhost;

猜你喜欢

转载自blog.csdn.net/benben0729/article/details/81171549