mysql用户权限管理
电脑版发表于:2022/4/21 10:02
查询用户的权限:
Show grants for ‘用户名’@’主机名’
授权:
Grant 权限 on 数据库.表 to ‘用户名’@’主机名’
撤销权限:
revoke 权限 on 数据库.表 from ‘用户名’@’主机名’
实例:
-- 查询权限 show grants for 'aj'@'%' -- 授予权限 grant all on oa1212.* to 'aj'@'%' --撤销权限 revoke all on oa1212.* from 'aj'@'%'