不是用你给的, 你给的可能可以, 但不满足我的要求, 我想去掉用户的一部分权限,不是全部,而且是某个数据库的,再说一遍: grant insert,select,update on *.* to test@'%' identified by 'aaa'; 我后悔了, 不想让这个用户有mysql数据库的任何权限! revoke all on mysql.* from test@'%'; //如上出错提示 revoke insert,select,update on mysql.* from test@'%'; //提示一样
你给的没试,也许可以,但不合要求, 我要取消一部分权限 再说一次 grant select, insert,update on *.* to test@'%' identified by 'aaa'; 现在我后悔,不想让这个用户有讯问mysql这个数据库的任何权限 revoke all on mysql.* from test@'%' ;//出错,如上 revoke select, insert, update on mysql.* from test@'%';//同上错误。
呵呵,你应该这样操作呀,A: grant insert,select,update on *.* to test@'%' identified by 'aaa';B: 发现给他的权限过高 revoke ALL on *.* from test@'%'; C: 然后再用 GRANT 语句对其添加权限 GRANT ALL ON db1.* to test@'%' identified by 'aaa'
睡不着就多看看参考手册,再多想想嘛!!:)
开玩笑了..
有注意到吗?
TO ...
FROM ...
用户对象是要一致的,不然怎么知你所操作地是针对于哪个用户呢???
grant insert,select,update on *.* to test@'%' identified by 'aaa';
我后悔了, 不想让这个用户有mysql数据库的任何权限!
revoke all on mysql.* from test@'%'; //如上出错提示
revoke insert,select,update on mysql.* from test@'%'; //提示一样
再说一次
grant select, insert,update on *.* to test@'%' identified by 'aaa';
现在我后悔,不想让这个用户有讯问mysql这个数据库的任何权限
revoke all on mysql.* from test@'%' ;//出错,如上
revoke select, insert, update on mysql.* from test@'%';//同上错误。
grant insert,select,update on *.* to test@'%' identified by 'aaa';B: 发现给他的权限过高
revoke ALL on *.* from test@'%';
C: 然后再用 GRANT 语句对其添加权限
GRANT ALL ON db1.* to test@'%' identified by 'aaa'