赞
踩
- mysql> grant all privileges on *.* to 'xiaokang'@'%' with grant option;
- Query OK, 0 rows affected (0.09 sec)
mysql> REVOKE all privileges ON *.* FROM 'xiaokang'@'%';
查看完MySQL8.0.16官方文档后得知: SYSTEM_USER是mysql新权限,并且在root用户下创建新用户xiaokang时会授予SYSTEM_USER权限,而自己却没有SYSTEM_USER权限。
得知原因后有以下两种办法:
- # xiaokang用户下操作
- mysql> grant system_user on *.* to root;
- Query OK, 0 rows affected (0.06 sec)
- # root用户下的操作
- mysql> revoke all privileges on *.* from xiaokang;
- Query OK, 0 rows affected (0.02 sec)
可以看到xiaokang用户的所有权限撤销成功
- # xiaokang用户下的操作
- mysql> revoke all privileges on *.* from xiaokang;
- Query OK, 0 rows affected (0.01 sec)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。