Homestead: MySQL DB Provisioning Error in Provision CLI Output

Created on 11 Feb 2021  路  2Comments  路  Source: laravel/homestead

Versions

  • Vagrant: 2.2.14
  • Provider: Virtualbox 6.1.16
  • Homestead: 11.0.0 (latest from release branch)

Host operating system

macOS 10.14.6

Homestead.yaml

https://gist.github.com/RossIV/13909bf231541caabefa0ffed51685ea

Vagrant destroy & up output

https://gist.github.com/RossIV/5ddf55180f73a5ec67aba8b082ad5164

Expected behavior

Creation of databases listed in Homestead.yaml file in MySQL upon initial box provisioning, and output status of creation of each database listed to the console.

Actual behavior

Databases were created, but the CLI output indicated otherwise.

Specific section of vagrant up output:

==> homestead: Running provisioner: Creating MySQL / MariaDB Database: homestead (shell)...
    homestead: Running: script: Creating MySQL / MariaDB Database: homestead
    homestead: We didn't find a PID for mariadb, skipping $DB creation
==> homestead: Running provisioner: Creating MySQL / MariaDB Database: test2314 (shell)...
    homestead: Running: script: Creating MySQL / MariaDB Database: test2314
    homestead: We didn't find a PID for mariadb, skipping $DB creation
==> homestead: Running provisioner: Creating MySQL / MariaDB Database: testagain (shell)...
    homestead: Running: script: Creating MySQL / MariaDB Database: testagain
    homestead: We didn't find a PID for mariadb, skipping $DB creation

Also of note, mysql shows as an invalid feature in the same output - not sure if that's related but figured it's worth mentioning.

    homestead: Running: inline script
    homestead: Invalid feature: mysql

Steps to reproduce

  1. cd ~/Homestead
  2. git fetch
  3. git pull origin release
  4. bash init.sh (answer y to prompts)
  5. vagrant box update
  6. Update Homestead.yaml to add additional entries to the list of databases
  7. vagrant up
  8. vagrant ssh
  9. mysql -u homestead -p
  10. show databases;
Needs Validation of Existing Bug

Most helpful comment

This same issue happened with me when upgrading from 9.x to 11.x. Unfortunately I didn't log output, but the errors were the same as noted by the OP. When running git fetch and git pull origin release, 11.x is pulled. Everything ran appropriately except for databases, where only the default homestead database was created in the virtualbox. All other databases were skipped due to PID error. Tried several combinations for feature key in yaml file:

features:
  - mysql: true
features:
  - mysql: true
  - mariadb: false
features:
  - mysql: false
  - mariadb: true
features:
  - mariadb: true

I did try adding the "services" key as provided above by @svpernova09, but didn't see a change in the result.

I was able to get passed the issue by specifically checking out 12.1.1 and re-provisioning. I'm unsure what still needs to be done for 12.x to become release, but it appears to be working as expected.

All 2 comments

From your Homestead.yaml, add the following:

services:
    - enabled:
        - "mysql"

This same issue happened with me when upgrading from 9.x to 11.x. Unfortunately I didn't log output, but the errors were the same as noted by the OP. When running git fetch and git pull origin release, 11.x is pulled. Everything ran appropriately except for databases, where only the default homestead database was created in the virtualbox. All other databases were skipped due to PID error. Tried several combinations for feature key in yaml file:

features:
  - mysql: true
features:
  - mysql: true
  - mariadb: false
features:
  - mysql: false
  - mariadb: true
features:
  - mariadb: true

I did try adding the "services" key as provided above by @svpernova09, but didn't see a change in the result.

I was able to get passed the issue by specifically checking out 12.1.1 and re-provisioning. I'm unsure what still needs to be done for 12.x to become release, but it appears to be working as expected.

Was this page helpful?
0 / 5 - 0 ratings