Database is not created. Message: "We didn't find MariaDB ($mariadb), skipping $DB creation" when using default mysql config
danieldunderfelt opened this issue · comments
Versions
- Vagrant: 2.3.7
- Provider: Parallels 19
- Homestead: release
Host operating system
macOS
Homestead.yaml
---
ip: "192.168.56.56"
memory: 4096
cpus: 4
provider: parallels
box: laravel/homestead-arm
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Work/escaperoom
to: /home/vagrant/escaperoom
sites:
- map: escaperoom.test
to: /home/vagrant/escaperoom/htdocs
databases:
- escaperoom
features:
- mysql: true
- mariadb: false
- postgresql: false
- ohmyzsh: false
- webdriver: false
services:
- enabled:
- "mysql"
# - disabled:
# - "postgresql@11-main"
#ports:
# - send: 33060 # MySQL/MariaDB
# to: 3306
# - send: 4040
# to: 4040
# - send: 54320 # PostgreSQL
# to: 5432
# - send: 8025 # Mailhog
# to: 8025
# - send: 9600
# to: 9600
# - send: 27017
# to: 27017
Vagrant destroy & up output
https://gist.github.com/danieldunderfelt/084b9d07ca323d44b5a4352de82b81d7
Expected behavior
Database escaperoom
should be created. I should be able to connect to mysql from the host.
Actual behavior
As seen in the up
logs, it complains about MariaDB and refuses to create the DB. When I try to connect to the DB, it says "connection refused".
I also tried using MariaDB, which is what I actually want to use. In that case, the up
logs contained the following:
homestead: We didn't find MySQL ($mysql), skipping $DB creation
homestead: mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead
This is going to sound silly, but I think it's a service timing issue.
open up scripts/create-mysql.sh
and look around line 20 for DB=$1
, add sleep 1
under it to result in:
DB=$1;
sleep 1
If you vagrant destroy -f; vagrant up
the DB will be created. From my local testing w/ laravel/homestead-arm
:
...
homestead: Running: script: Restart Webserver
==> homestead: Running provisioner: Creating MySQL / MariaDB Database: fresh (shell)...
homestead: Running: script: Creating MySQL / MariaDB Database: fresh
homestead: We didn't find MariaDB ($mariadb), skipping $DB creation
==> homestead: Running provisioner: Update Composer (shell)...
homestead: Running: script: Update Composer
...