3621
MySQLERRORCommonAccess ControlHIGH confidence
Access denied — user account is locked
Production Risk
High — All connections from this account are rejected; application downtime possible.
How to reproduce
trigger — this will error
trigger — this will error
ALTER USER 'user'@'%' ACCOUNT LOCK; -- Subsequent connection attempt by 'user'
expected output
ERROR 3621 (HY000): Access denied for user 'user'@'%'. Account is locked.
Fix
Unlock the account
Unlock the account
ALTER USER 'user'@'%' ACCOUNT UNLOCK;
Why this works
Removes the account lock, allowing the user to authenticate again.
What not to do
✕
Version notes
Sources
Official documentation ↗
MySQL 8.0 — 3621 ER_ACCESS_DENIED_FOR_USER_ACCOUNT_LOCKED
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev