mysql回收权限不成功,请问如何破?

李惟
  • 2.1k

过程如下:

mysql> revoke all on *.* from 'levi'@'%';
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> show grants for `levi`;
+-----------------------------------------------------------------------------------------------------------------------+
| Grants for [email protected]%                                                                                                     |
+-----------------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'levi'@'%' IDENTIFIED BY PASSWORD '抱歉呀,这个我隐藏啦=  =~~~~~~~~~~~~~~~~~~~~' WITH GRANT OPTION |
| GRANT ALL PRIVILEGES ON `wordpress`.* TO 'levi'@'%' WITH GRANT OPTION                                                 |
+-----------------------------------------------------------------------------------------------------------------------+

那结果就是,登录levi这个用户之后,可以查看所有的数据库,只能操作wordpress这个数据库

我希望的是,登录levi这个用户之后,只能查看、操作wordpress这个数据库

回复
阅读 3.3k
1 个回答
✓ 已被采纳

自己找到解决办法了,删除用户,重新建

宣传栏