How To Revoke User Privileges

Q

How To Revoke User Privileges? - MySQL FAQs - Managing User Accounts and Access Privileges

✍: FYIcenter.com

A

If your want remove some granted user privileges, you can use the "REVOKE privilegeName ..." command. You can only revoke privileges in the same way as they were granted. For example, you can not revoke a privilege on a specific database, if that privilege was granted to all databases. The following tutorial exercise shows you how to view user's granted privileges:

>cd \mysql\bin
>mysql -u root -pretneciyf

mysql> GRANT CREATE ON *.* TO DEV;
Query OK, 0 rows affected (0.00 sec)

mysql> REVOKE CREATE ON QA.* FROM DEV;
ERROR 1141 (42000): There is no such grant defined for
 user 'DEV' on host '%'

mysql> REVOKE CREATE ON *.* FROM DEV;
Query OK, 0 rows affected (0.00 sec)

2007-05-08, 5265👍, 0💬