REVOKE removes previously granted privileges or roles from one or more MySQL accounts.
REVOKE lets you strip specific privileges while keeping the account active, avoiding broken applications that still need limited access.
Use REVOKE privilege_list ON object FROM user;
to remove rights from a database object without touching other permissions.
Pass ALL PRIVILEGES
to instantly clear every right the user holds on the target object.
Yes.List columns in parentheses: REVOKE SELECT (price, stock) ON Products FROM 'sales_rep'@'%';
Run SHOW GRANTS FOR 'sales_rep'@'%';
to confirm existing rights.
Execute REVOKE INSERT, UPDATE ON Products FROM 'sales_rep'@'%';
Repeat SHOW GRANTS
to ensure the privileges were removed.
Audit roles monthly, use roles instead of direct user grants, and test revokes in staging before production.
Always include the host part of the account and limit transactions during privilege changes to prevent lock errors.
.
No. DCL statements like GRANT and REVOKE automatically update privilege tables and take effect immediately.
Existing sessions retain their current privileges until they reconnect. Plan maintenance windows if immediate effect is critical.
Yes. Run an equivalent GRANT statement to restore the removed privileges.