mysql的权限管理

查看系统的用户

use mysql;

select user,host,password from user;

更新密码

set password for root@localhost = password('123'); 

删除用户

drop user 'test'@'localhost';

查看用户权限

show grants for 'test'@'%';

授权

grant all privileges on test.* to abc@'%';

取消授权

revoke all privileges on test.* from abc@'%';

刷新

flush privileges;

 

 

 

 

Author: bkdwei