3388
MySQLERRORCommonAccess ControlHIGH confidence
Roles cannot be granted to an anonymous user
Production Risk
Low — informational warning; no role management is performed.
How to reproduce
trigger — this will error
trigger — this will error
SHOW GRANTS FOR ''@'localhost';
expected output
Warning 3388: Roles granted to an anonymous user are not supported.
Fix
Remove anonymous accounts
Remove anonymous accounts
DROP USER ''@'localhost'; DROP USER ''@'';
Why this works
Eliminates anonymous accounts that should not exist in a secured MySQL installation.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 3388 ER_ROLES_GRANTED_TO_ANONYMOUS_USER
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev