This is very annoying....
disconnect_on_expired_password is set to ON.
MySql version is:

Server: Localhost via UNIX socket
Server type: MySQL
Server version: 5.7.5-m15 - MySQL Community Server (GPL)

I need to understand which of my MySql users is causing this error:
[Note] Your password has expired. To log in you must change it using a client that supports expired passwords.

I tried setting default password lifetime to 0 so: SET GLOBAL default_password_lifetime = 0; according to MySQL password expired, and default_password_lifetime now shows 360 and still I get the error.

I tried setting disconnect_on_expired_password but with no luck.
SELECT @@GLOBAL.disconnect_on_expired_password;

| @@GLOBAL.disconnect_on_expired_password |
|                                       1 |

So I tried:
SET GLOBAL disconnect_on_expired_password=0; ERROR 1238 (HY000): Variable 'disconnect_on_expired_password' is a read only variable

My questions are:

  1. how can I know which of my MySql users is causing the error mentioned above?
  2. how can I change disconnect_on_expired_password if @all??


1 Answer 1

  1. This should give you a good idea as to which mysql user(s) is/are causing the error:

    SELECT user, host FROM mysql.user WHERE password_expired = 'Y';

  2. To change disconnect_on_expired_password: Edit /etc/my.cnf, find the mysqld section, add this line:


    Then restart mysqld.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.