How to revoke privileges
The syntax of the REVOKE
statement for all privileges
REVOKE ALL[ PRIVILEGES], GRANT OPTION FROM user [, user];
A statement that revokes all privileges from a user
REVOKE ALL, GRANT OPTION FROM dba;
A statement that revokes all privileges from multiple users
REVOKE ALL, GRANT OPTION FROM dba, joel@localhost;
The syntax of the REVOKE
statement for specific privileges
REVOKE privilegeList ON [dbName.]table FROM user [, user];
A statement that revokes specific privileges from a user
REVOKE UPDATE, DELETE ON my_guitar_shop2.customers FROM joel@localhost;
Description
- You can use the
REVOKE
statement to revoke privileges from a user.
- To revoke all privileges, you must have the global
CREATE USER
privilege.
- To revoke specific privileges, you must have the
GRANT OPTION
privilege and you must have the privileges that you are revoking.
- To delete a user account, use the
DROP USER
statement.
Back