ERROR 1862 (HY000): Your password has expired

I was installing new MySQL Version 5.6.12, starts the server and when i try to connect using password from /root/.mysql_secret file I got disconnected with following error
ERROR 1862 (HY000): Your password has expired. To log in you must change it using a client that supports expired passwords. After some hit and try i got into mysql console and reset the root password using mysql> SET PASSWORD = PASSWORD(‘root’); Now i am trying understand why I was getting ERROR 1862 (HY000). I tried to reproduce the same error by reinstalling 5.6.12 but no success. I expired the password manually, however i am still able to connect to console and just getting error “ERROR 1820 (HY000): You must SET PASSWORD before executing this statement” when i issue some command on console. As per the doc [url]http://dev.mysql.com/doc/mysql-security-excerpt/5.6/en/password-expiration.html[/url] i should get ERROR 1862 (HY000) after expiring passwords. any idea?

Hi,

Looks like when you have installed 5.6.12, password expiration capability was enable and when first time you attempt to login, your user/client has been put in “sanbox mode”. so first time you got error like something like this.

shell> mysql -u myuser -p Password: ****** ERROR 1862 (HY000): Your password has expired. To log in you must change it using a client that supports expired passwords.
and when

mysql> USE test; ERROR 1820 (HY000): You must SET PASSWORD before executing this statement
So as per the documentation, after enable expiration, when first time you’ll attempt to login, you 'll get 1862 error but after login, if you’ll try to run any command other than SET then you’ll get error 1820.

I hope this makes sense. Thanks.

Yes that must be the case, but how can i reproduce the error or how can i put mysql in sandbox mode manually?

Hi,

I think to reproduce it, either you can remove that version from server and re-install same MySQL version again OR you can install same version on some another server/VM and check. sandbox mode is apply by MySQL itself so you can’t change it manually.