3384
MySQLERRORNotableAccess ControlHIGH confidence

Role has not been granted to user

Production Risk

Low — REVOKE fails; no change occurs.

How to reproduce
trigger — this will error
trigger — this will error
REVOKE my_role FROM 'user'@'localhost';

expected output

ERROR 3384 (HY000): Role was not granted to user.

Fix

Check current role grants

Check current role grants
SHOW GRANTS FOR 'user'@'localhost';

Why this works

Lists all privileges and roles currently granted to the user to confirm what can be revoked.

What not to do

Sources
Official documentation ↗

MySQL 8.0 — 3384 ER_ROLE_NOT_GRANTED

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MySQL errors