"Your password has expired" after restart mysql when updated mysql 5.7.8-rc(debian) echo time login in mysql shell it shows:

ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.


and error log shows:
Your password has expired. To log in you must change it using a client that supports expired passwords.
MySQL password expired

Typically, in a script shell, you get the message: "Your password has expired. To log in you must change it using a client that supports expired passwords."

From MySQL 5.7.4 to 5.7.10, the default value for the default_password_lifetime variable is 360 (a year). For those versions, if you make no changes to this variable or individual user accounts, all user passwords will expire after 360 days.

To prevent automatic password expiry log in as root:

mysql -u root -p

then, for clients that automatically connect to the server (e.g. from scripts.) change the password expiration settings for those clients:

ALTER USER 'script'@'localhost' PASSWORD EXPIRE NEVER;

or just disable automatic password expiration for all users:

SET GLOBAL default_password_lifetime = 0;

Links and resources:

MySQL: Password Expiration and Sandbox Mode
MySQL: Password Expiration Policy
Password expiration policy in MySQL Server 5.7