海外主机测评

您现在的位置是:首页 > 服务器 > 正文

服务器

MySQL 权限管理

cds8202023-02-13服务器170
2.1查看用户权限#showgrantsfor''@'名'mysql>showgrantsfor'mytest'@'%&#

2.1 查看用户权限

#show grants for ''@'名'
mysql> show grants for 'mytest'@'%';

2.2 用户授权

#grant 权限列表 on 库名.表名 to '用户名'@'主机名'; (多个权限需要使用逗号隔开)
mysql> grant all on *.* to 'mytest'@'%';

2.3 取消权限

#revoke 权限列表 on 名.表名 from '用户名'@'主机名';
mysql> revoke select on company.account from 'mytest'@'%';

发表评论

评论列表

  • 这篇文章还没有收到评论,赶紧来抢沙发吧~