SQL Server error 18488: Login failed, password must be changed
The SQL login is flagged MUST_CHANGE, so it has to set a new password before it can connect. Many drivers can't do that, so the login just fails.
- Error number
18488- Severity
- 14
- Category
- Connection and login
What it means
A login created or reset with MUST_CHANGE must choose a new password the first time it connects. Tools such as SSMS and sqlcmd offer to change it during login; applications and many drivers don't, so they fail with 18488.
Common causes
- The login was created or its password reset with
MUST_CHANGE. - An application connects with a newly created login that was meant for a person to sign in with first.
How to fix it
-
Have an administrator set a password without
MUST_CHANGE.ALTER LOGIN app_user WITH PASSWORD = N'<new strong password>';
-
Or sign in once with SSMS or
sqlcmd, which prompt for the new password, then use that password in the application.
Related errors
More connection and login errors
53Network-related or instance-specific4060Cannot open database requested4064Cannot open user default database18452Login is from an untrusted domain18470Login failed, account disabled18486Login failed, account locked out18461Login failed, single user mode
The code and message text are from the Microsoft Database Engine events and errors reference. Browse the full SQL Server error list or search every database error.
Work on SQL Server in SQLly
A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for SQL Server and the other databases you use.