GRANT  ALL ON *.* TO test@"%";
REVOKE ALL ON *.* FROM test@"%";

解决方案 »

  1.   

    呵呵,
    睡不着就多看看参考手册,再多想想嘛!!:)
    开玩笑了..
    有注意到吗?
    TO ...
    FROM ...
    用户对象是要一致的,不然怎么知你所操作地是针对于哪个用户呢???
      

  2.   

    真的不行, 我打错了, 我在试的时候名字肯定是一样的, 它说我没有定义这样的grant,不知道怎么回事, 我是想取消这个用户对某一个数据库的所有权限。
      

  3.   

    不是用你给的, 你给的可能可以, 但不满足我的要求, 我想去掉用户的一部分权限,不是全部,而且是某个数据库的,再说一遍:
    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@'%'; //提示一样
      

  4.   

    你给的没试,也许可以,但不合要求, 我要取消一部分权限
    再说一次
    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@'%';//同上错误。
      

  5.   

    呵呵,你应该这样操作呀,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'