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

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注