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

**Code:** `1862` · **Category:** MySQL · **Seen on:** MySQL

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

## 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?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/mysql/1862-password-expired)
