小可爱

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'@'%'


 


关于TNBLOG
TNBLOG,技术分享。技术交流:群号677373950
ICP备案 :渝ICP备18016597号-1
App store Android
精彩评论
{{item.replyName}}
{{item.content}}
{{item.time}}
{{subpj.replyName}}
@{{subpj.beReplyName}}{{subpj.content}}
{{subpj.time}}
猜你喜欢