> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/server/reference/error-codes/mariadb-error-codes-1800-to-1899/e1862.md).

# Error 1862: Your password has expired. To log in you must change it using a client that supports exp

| Error Code | SQLSTATE | Error                             | Description                                                                                             |
| ---------- | -------- | --------------------------------- | ------------------------------------------------------------------------------------------------------- |
| 1862       | HY000    | ER\_MUST\_CHANGE\_PASSWORD\_LOGIN | Your password has expired. To log in you must change it using a client that supports expired passwords. |

## Possible Causes and Solutions

The password of the account has [expired](/docs/server/security/user-account-management/user-password-expiry.md), [disconnect\_on\_expired\_password](/docs/server/server-management/variables-and-modes/server-system-variables.md#disconnect_on_expired_password) is on, and the client didn't tell the server that it can handle an expired password. The server then refuses the connection.

The [mariadb client](/docs/server/clients-and-utilities/mariadb-client/mariadb-command-line-client.md) tells the server that it can handle an expired password when it runs interactively, and in batch mode only with [--connect-expired-password](/docs/server/clients-and-utilities/mariadb-client/mariadb-command-line-client.md#connect-expired-password). For example, with `-e`:

```
mariadb -u app -p -e "SELECT 1"
ERROR 1862 (HY000): Your password has expired. To log in you must change it using a client that supports expired passwords
```

To solve the error:

* Connect with a client that supports expired passwords, such as the `mariadb` client in interactive mode or with `--connect-expired-password`. The session starts in sandbox mode, where you set a new password with [SET PASSWORD](/docs/server/reference/sql-statements/account-management-sql-statements/set-password.md). Until you do, other statements fail with [error 1820](/docs/server/reference/error-codes/mariadb-error-codes-1800-to-1899/e1820.md).
* Ask an administrator to set a new password for the account with `ALTER USER`, or to remove the expiry with `ALTER USER … PASSWORD EXPIRE NEVER`.

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}
