Bug #76053 Expired-password message is out of date
Submitted: 25 Feb 2015 18:01 Modified: 28 May 2015 17:36
Reporter: Paul DuBois Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version:5.7.6 OS:Any
Assigned to: CPU Architecture:Any

[25 Feb 2015 18:01] Paul DuBois
Description:
The message displayed to indicate that a password is expired mentions SET PASSWORD, which is deprecated as of MySQL 5.7.6.

How to repeat:
mysql> alter user current_user password expire;
Query OK, 0 rows affected (0.01 sec)

mysql> show databases;
ERROR 1820 (HY000): You must SET PASSWORD before executing this statement

Suggested fix:
Refer to ALTER USER rather than SET PASSWORD. I suggest:

You must use ALTER USER CURRENT_USER IDENTIFIED BY <new password> before executing this statement

Or, if a more lengthy message is acceptable:

You must reset your password with ALTER USER CURRENT_USER IDENTIFIED BY <new password> before executing this statement
[4 Apr 2015 19:56] Paul DuBois
I guess a better message than the previous suggestion would be:

You must reset your password with ALTER USER USER() IDENTIFIED BY <new password> before executing this statement
[28 May 2015 17:36] Paul DuBois
Noted in 5.7.8, 5.8.0 changelogs.

The message displayed to indicate that a password was expired and 
must be reset referred to the deprecated SET PASSWORD statement. It
now refers to ALTER USER.