ITPub博客

首页 > 数据库 > MySQL > MySQL 一键收回用户所有权限

MySQL 一键收回用户所有权限

原创 MySQL 作者:甲骨文技术支持 时间:2017-12-18 08:47:41 0 删除 编辑



  1. mysql> show grants for gltest@localhost;
  2. +-----------------------------------------------------+
  3. | Grants for gltest@localhost |
  4. +-----------------------------------------------------+
  5. | GRANT ALL PRIVILEGES ON *.* TO 'gltest'@'localhost' |
  6. | GRANT SELECT ON `orcl`.* TO 'gltest'@'localhost' |
  7. +-----------------------------------------------------+
  8. 2 rows in set (0.00 sec)

  9. mysql> revoke all,grant option from gltest@localhost;
  10. Query OK, 0 rows affected (0.00 sec)

  11. mysql> show grants for gltest@localhost;
  12. +--------------------------------------------+
  13. | Grants for gltest@localhost |
  14. +--------------------------------------------+
  15. | GRANT USAGE ON *.* TO 'gltest'@'localhost' |
  16. +--------------------------------------------+
  17. 1 row in set (0.00 sec)

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/20893244/viewspace-2148787/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
2009年获得Oracle OCM认证,ITPUB社区OCM联盟成员,熟悉Oracle,mysql,Python,Zabbix等。

注册时间:2016-12-31

  • 博文量
    143
  • 访问量
    570499