I'm using homestead for a php project (not laravel) which we need to run on mysql5.7
Whilst my dev version runs fine as its around a year old, the version I shared today with my colleague installed the latest homestead version that ships with mysql8.
Anyone experienced with homestead able to advise on how to downgrade the mysql version, or alternatively advise on latest version that we can use that gives at least php 7.3 but doesn't force us to use mysql8?
Homestead v10 no longer includes MySQL 5.7; instead MySQL 8 is installed by default.
The feature script "mysql8" has been removed in Homestead version 10.0.0 as well.
The solution I found was to downgrade to Homestead 9 for any projects requiring MySQL 5.7. The alternative is to use Homestead 10 and manually install MySQL 5.7.
Do you know what command Id run to install the latest 9.* which supports MySQL 5? That’s the last piece in the puzzle to get this working on my colleagues local dev environment
I found the easiest way for me to update was to open my homestead folder in terminal (cd ~/Homestead) and then run "vagrant box update". After the update is downloaded I like to run "vagrant box prune" to remove any older versions of Homestead.
To see what version of Homestead you have installed, run "vagrant box list" from within the Homestead folder.
// update the box
vagrant box update
// list all versions of box
vagrant box list
// remove old versions of a box
vagrant box prune
When you start the box, "vagrant box up", the terminal will tell you if you are using an outdated version. I don't like keeping old version of a box around so i like to run "vagrant box update" to download the latest copy of 9 (version 9.7.2 / (https://app.vagrantup.com/laravel/boxes/homestead) and then i run "vagrant box prune" to remove those any old versions from my machine.
To install/update a specific version of a box you can use the Vagrant box add option "--box-version VALUE". Here is an example.
As for your colleague i would run the command to remove version 10 and then use the box-version command above to install version 9.7.2 (https://app.vagrantup.com/laravel/boxes/homestead/versions/9.7.2). You could try just running vagrant box add laravel/homestead, but that may install version 10.