#修改用户密码
alter user user() identified by "123456";
#为用户赋权
grant all privileges on mq.* to 'user'@'host' identified by 'passwd';
grant select,update,alter,delete privileges on mq.* to 'user'@'host' identified by 'passwd';
#为用户撤权
revoke privilege ON databasename.tablename FROM 'username'@'host';
revoke select on mq.* from 'user'@'host';
查看用户的授权
show grants for 'user'@'host';
#GRANT USAGE:mysql usage权限就是空权限,默认create user的权限,只能连库,啥也不能干
文档更新时间: 2020-05-25 14:37 作者:张尚