mysql> REVOKE INSERT ON *.* FROM 'jeff'@'localhost';
mysql> REVOKE Replication Client ON *.* FROM 'repl'@'%';
mysql> REVOKE Replication Client ON *.* FROM 'repl'@'192.168.1.1';
mysql> REVOKE Replication Slave ON *.* FROM 'repl'@'%';
mysql> REVOKE Replication Slave ON *.* FROM 'repl'@'192.168.1.1';
mysql> show grants for repl;
mysql> show grants for repl@'%';
mysql> show grants for repl@'192.168.1.1';
mysql> select user,host from mysql.user;
"GRANT Replcation Slave ON *.* TO 'repl'@'%' IDENTIFIED BY PASSWORD '***********';"
disappeared
but
"GRANT USAGE ON *.* TO 'repl'@'%' IDENTIFIED BY PASSWORD '***********';"
is still there
--> http://dba.stackexchange.com/questions/13083/cant-remove-grant-usage
"""...
When you ran the REVOKE command, you simply removed the row from mysql.db. This did not touch the row in mysql.user.
...
You can't actually revoke USAGE, without dropping the user.USAGE is a global level privilege.
..."""
-->
mysql> drop user repl@'%';
//=== https://dev.mysql.com/doc/refman/5.0/en/revoke.html
To revoke all privileges,
( drops all global, database, table, column, and routine privileges for the named user or users)
mysql> REVOKE ALL PRIVILEGES, GRANT OPTION FROM u11,u12,u13;
2015年5月8日 星期五
mysql reovke examples
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言