I have gotten stuck all day with an expired password for mysql. I have followed other similar questions yet I continue to get the same password expired error. I have uninstalled and reenstalled Mysql with homebrew. I have restarted the mysql server. I have deleted,changed and created homestead users in mysql and even uninstalled then reinstalled homestead and vagrant.None of this is working. What should I do?
Edit-Update:
I can make it into the mysql with the following using sequel pro:
but having this in the .env file reproduces the expired password error.:
What I've done for now is to set the password again.
vagrant ssh
mysql -u homestead -p
SET password=PASSWORD("secret");
This has started happening on all my vagrant boxes, some that haven't even been provisioned lately which means wildly different MySQL versions, typically 5.6+ at least. It's not a long term fix either sadly. These steps will have to be repeated until someone can track down how to fix it for good.
Edit: I'm using Homestead v2 with a tweak to use this box: https://atlas.hashicorp.com/laravel/boxes/homestead/versions/0.3.3. They're all the same MySQL version which explains why I'm seeing this across the board.
The current version of MySQL for that box is 5.7.9 and the password expiration policy has the default default_password_lifetime
at 360. The password in that box has a password_last_changed
time of 2015-11-13 03:50:18
. 360 days after that is 2016-11-07 03:50:18
which I believe precisely explains why this occurred in the first place.
I checked all of the possible MySQL config locations and I see nothing overriding this default. I believe setting it to 0 or altering the user to never expire (after the set password command) should be enough to fix it for good, I hope.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With