I am getting the below error for the user root@'%', but when I login through root@'localhost',I can see the password_expired = 'N' for root@'%'
Server version: 5.7.9-log MySQL Community Server (GPL)
ERROR 1820 (HY000): You must reset your password using ALTER USER
statement before executing this statement.
+------+------+------------------+----------------+-------------------+-----------------------+
| user | host | password_expired | account_locked | password_lifetime | password_last_changed |
+------+------+------------------+----------------+-------------------+-----------------------+
| root | % | N | N | NULL | 2015-12-16 04:50:23 |
+------+------+------------------+----------------+-------------------+-----------------------+
Best Answer
The password is expired -- implicitly -- after 360 days -- in MySQL Server 5.7 versions prior to 5.7.11.
Temporary workaround should be this:
Better, add to the
mysqld
section ofmy.cnf
:...or another appropriate value for your site, then restart the server.
Even better still... upgrade. There were numerous bugs in early GA versions of 5.7, particularly 5.7.9, which was the first GA version of the release series.
Of course, you should be able to modify this account using
ALTER USER ... PASSWORD EXPIRE NEVER
which is apparently not the same as theNULL
value shown in the table.