Sometimes when you log in to MySQL, the password expiration prompt is prompted, such as:
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M02/8E/E6/wKioL1jPPGnBHHRDAAAQ6eqyaJ0296.png "title=" Clipboard.png "alt=" Wkiol1jppgnbhhrdaaaq6eqyaj0296.png "/>
At this time, the client window will not be able to log on to the MySQL database server, but through the command line operation, you can log on to the MySQL database server, but through the command line to log on to the MySQL database server, can not execute any command, you need to modify the MySQL password, the following actions:
mysql-uroot-pwf123456
SET PASSWORD = PASSWORD (' 123456 ');
Note: Use this command "Set password for [email protected] = password (' wf123456 ');" When you modify the password, the command error is prompted, the error code is "You must reset your password using ALTER USER statement before executing this statement." So change the password, try to use the above command.
ALTER USER ' root ' @ ' localhost ' PASSWORD EXPIRE never;
To see if the Password_expired field in the user table is Y, y, and the user has expired, n, the user has not expired.
After modifying the password of the account, the MySQL Client Connection tool will be able to reconnect to the database.
This article is from the "Why A Smile" blog, please be sure to keep this source http://helicon.blog.51cto.com/3926609/1908322
MySQL Password expiration issue