I upgraded laravel/homestead box to version 11.1.0. Then a surprising happened: My DBs disappeared. How? I have no idea. But then when I tried to reinstall the databases using Homestead.yaml, it did not work eventhough I added the list of databases in Homestead.yaml.
Here the what I did in Homestead.yaml:
databases:
- db00
- db01
Then I ran "vagrant provision" but nothing changed in MySQL. "show databases;" displayed default tables only.
Then I activated the features:
features:
- mysql: true
- mariadb: false
Then I ran "vagrant provision" and it worked. I had both databases (db00 and db01) in MySQL. Here are the problems:
Based on laravel/homestead documentation for laravel v8.x, there is no feature option for mysql. That caused the following error during provisioning:
homestead: Invalid feature: mysql homestead: Ignoring feature: mariadb because it is set to false
Once I added the option "- mysql" to the Homestead.yaml, I received the following errors for MariaDB
homestead: Running: script: Creating MySQL / MariaDB Database: db00 homestead: We didn't find a PID for mariadb, skipping $DB creation homestead: Running: script: Creating MySQL / MariaDB Database: db01 homestead: We didn't find a PID for mariadb, skipping $DB creation
Now here my question: What is going on? Without the feature option "- mysql" no database is created; no matter if I define the list under the databases. Once I add it, things work, databases are generated however, I get error that the feature is not valid. Also it is not included in the documentation. Where am I going wrong? or if anyone has an explanation or a better solution?