1862 MySQL Origin: Data OSI layer 7 · Application Last updated 2 Dec 2026

ERROR 1862 (HY000): Your password has expired. To log in you must change it using a client that supports expired passwords

The MySQL account's password has expired and the connection is restricted until it is changed.

Exact message you may see Your password has expiredTo log in you must change it using a client that supports expired passwords
Seen on: MySQL

Meaning

Password expiry policies (default_password_lifetime, PASSWORD EXPIRE) put the account in "sandbox mode": only ALTER USER ... IDENTIFIED BY and SET PASSWORD are allowed. Applications fail with this error until the password is reset.

Common causes

  • Account created with PASSWORD EXPIRE
  • default_password_lifetime reached
  • Client library not supporting expired-password mode
  • Service account with rotating policy

⚡ Quick fix

  1. Log in with the mysql client and run ALTER USER USER() IDENTIFIED BY 'new'
  2. Disable expiry for service accounts: ALTER USER 'app'@'%' PASSWORD EXPIRE NEVER
  3. Adjust default_password_lifetime

Detailed fix by platform

MySQL

  1. ALTER USER 'app'@'%' PASSWORD EXPIRE NEVER;

How to diagnose

  1. Policy — default_password_lifetime?
  2. Account — Per-user expiry?
  3. Client — Supports sandbox mode?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Data. Errors that are often confused with or caused by this one (click to open):

1005 — MySQL ERROR 1005 (HY000): Can't create table (errno: 150 "Foreign key constraint is incorrectly formed") (MySQL)10051007 — MySQL ERROR 1007 (HY000): Can't create database 'x'; database exists (MySQL)10071008 — MySQL ERROR 1008 (HY000): Can't drop database 'x'; database doesn't exist (MySQL)10081022 — MySQL ERROR 1022 (23000): Can't write; duplicate key in table (MySQL)10221032 — Last_SQL_Errno: 1032 — Could not execute Delete_rows event on table; Can't find record in 'table' (MySQL)10321698 — MySQL ERROR 1698 (28000): Access denied for user 'root'@'localhost' (MySQL)1698ORA-28001 — ORA-28001: the password has expired (SQL)ORA-280011862

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.