Lab-verifiedReproduced and fixed on MySQL 8.4.13 · 2026-11-30 · container image mysql:8.4
ERROR 3955 comes from the account options FAILED_LOGIN_ATTEMPTS and PASSWORD_LOCK_TIME. After that many consecutive wrong passwords, MySQL blocks the account for the set number of days (or UNBOUNDED). While blocked, the right password gets 3955 too, not 1045.
We reproduced two cases on MySQL 8.4 by connecting with mysql -h 127.0.0.1. MySQL has no Korean or Japanese text for this message, so it is in English on every language page.
01Wrong password typed until the FAILED_LOGIN_ATTEMPTS limit
The account has FAILED_LOGIN_ATTEMPTS 2 PASSWORD_LOCK_TIME 1. The first wrong password (shop2026 instead of Shop2026) gives the usual 1045. The second wrong one already returns 3955, and from then on the correct password is refused with 3955 as well. The message tells you the lock time and the remaining days.
Setup
CREATE USER app_user IDENTIFIED BY 'Shop2026' FAILED_LOGIN_ATTEMPTS 2 PASSWORD_LOCK_TIME 1;Query OK, 0 rows affected (0.01 sec)$ mysql -h 127.0.0.1 -u app_user -p'shop2026'SELECT CURRENT_USER();ERROR 1045 (28000): Access denied for user 'app_user'@'127.0.0.1' (using password: YES)$ mysql -h 127.0.0.1 -u app_user -p'shop2026'SELECT CURRENT_USER();ERROR 3955 (HY000): Access denied for user 'app_user'@'127.0.0.1'. Account is blocked for 1 day(s) (1 day(s) remaining) due to 2 consecutive failed logins.$ mysql -h 127.0.0.1 -u app_user -p'Shop2026'SELECT CURRENT_USER();ERROR 3955 (HY000): Access denied for user 'app_user'@'127.0.0.1'. Account is blocked for 1 day(s) (1 day(s) remaining) due to 2 consecutive failed logins.SELECT user, host, JSON_EXTRACT(user_attributes, '$.Password_locking') AS password_locking FROM mysql.user WHERE user = 'app_user';+----------+------+------------------------------------------------------------+
| user | host | password_locking |
+----------+------+------------------------------------------------------------+
| app_user | % | {"failed_login_attempts": 2, "password_lock_time_days": 1} |
+----------+------+------------------------------------------------------------+
1 row in set (0.00 sec)ALTER USER app_user ACCOUNT UNLOCK;Query OK, 0 rows affected (0.00 sec)mysql.user.user_attributes shows the setting (failed_login_attempts: 2, password_lock_time_days: 1). An admin runs ALTER USER app_user ACCOUNT UNLOCK; and the correct password works again. Without it you wait until the lock time ends.
$ mysql -h 127.0.0.1 -u app_user -p'Shop2026'SELECT CURRENT_USER();+----------------+
| CURRENT_USER() |
+----------------+
| app_user@% |
+----------------+
1 row in set (0.00 sec)02The app keeps retrying the old password after a password change
The password was changed to New2026pw, but an app or batch job still uses Old2025pw. Its retries count as failed logins: two 1045s, then 3955 on the third. With PASSWORD_LOCK_TIME UNBOUNDED the message says blocked for unlimited day(s), and the person using the new password is locked out too.
Setup
CREATE USER app_user IDENTIFIED BY 'Old2025pw' FAILED_LOGIN_ATTEMPTS 3 PASSWORD_LOCK_TIME UNBOUNDED;
ALTER USER app_user IDENTIFIED BY 'New2026pw';Query OK, 0 rows affected (0.01 sec)
Query OK, 0 rows affected (0.01 sec)$ mysql -h 127.0.0.1 -u app_user -p'Old2025pw'SELECT CURRENT_USER();ERROR 1045 (28000): Access denied for user 'app_user'@'127.0.0.1' (using password: YES)$ mysql -h 127.0.0.1 -u app_user -p'Old2025pw'SELECT CURRENT_USER();ERROR 1045 (28000): Access denied for user 'app_user'@'127.0.0.1' (using password: YES)$ mysql -h 127.0.0.1 -u app_user -p'Old2025pw'SELECT CURRENT_USER();ERROR 3955 (HY000): Access denied for user 'app_user'@'127.0.0.1'. Account is blocked for unlimited day(s) (unlimited day(s) remaining) due to 3 consecutive failed logins.$ mysql -h 127.0.0.1 -u app_user -p'New2026pw'SELECT CURRENT_USER();ERROR 3955 (HY000): Access denied for user 'app_user'@'127.0.0.1'. Account is blocked for unlimited day(s) (unlimited day(s) remaining) due to 3 consecutive failed logins.ALTER USER app_user ACCOUNT UNLOCK;Query OK, 0 rows affected (0.01 sec)Unlock with ALTER USER app_user ACCOUNT UNLOCK;. The new password then works. Update the password in every app that uses the account first, or it will be locked again.
$ mysql -h 127.0.0.1 -u app_user -p'New2026pw'SELECT CURRENT_USER();+----------------+
| CURRENT_USER() |
+----------------+
| app_user@% |
+----------------+
1 row in set (0.00 sec)FAQ
How do I unlock a MySQL account blocked by failed logins?
As an admin run ALTER USER 'user'@'host' ACCOUNT UNLOCK;. In our test the correct password worked again right after it.
Why is my correct password refused with ERROR 3955?
The account is already blocked. While the lock lasts, every login gets 3955, even with the right password. Unlock it or wait for PASSWORD_LOCK_TIME to pass.
Where do I see FAILED_LOGIN_ATTEMPTS for a user?
Query user_attributes in mysql.user, for example JSON_EXTRACT(user_attributes, '$.Password_locking'). It shows failed_login_attempts and password_lock_time_days.
How we verify
Each scenario starts from fresh database users. A script runs the setup, confirms the exact error code, applies the fix and runs the statement again. The output shown is what the database printed, saved by the script.
lab_a and lab_b are ordinary users created for the test, each with full rights on a database of the same name (its default database); root is the administrator. MySQL 8.4.13