Account Locking
Explains how to lock and unlock user accounts using `CREATE USER` and `ALTER USER` statements to prevent login access without deleting the account.
Syntax
CREATE USER [...]
[lock_option] [password_option]
ALTER USER [...]
[lock_option] [password_option] Description
Locking Accounts
CREATE USER 'lorin'@'localhost' ACCOUNT LOCK;ALTER USER 'marijn'@'localhost' ACCOUNT LOCK;mariadb -ulorin
ERROR 4151 (HY000): Access denied, this account is lockedUnlocking Accounts
Show Whether a Specific Account is Locked
Find Locked Accounts
See Also
Last updated
Was this helpful?

