Homestead: Trying to install mysql db "mydb" when disabling mysql

Created on 20 Oct 2020  路  8Comments  路  Source: laravel/homestead

Please note that the Homestead issue tracker is reserved for bug reports and enhancements. We are not always able to debug Vagrant, Provider or Operating System issues, but will do our best to help. Thank you!

Versions

  • Vagrant: Vagrant 2.2.10
  • Provider: Virtualbox 6.1
  • Homestead: 10.14.0

Host operating system

Ubuntu 20.04

Homestead.yaml

---
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: virtualbox

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: ~/Code/sun-acc
      to: /home/vagrant/code

sites:
    - map: sun-acc.test
      to: /home/vagrant/code/public
      schedule: true

services:
    - enabled:
        - "postgresql@12-main"
    - stop:
        - "mysql"
    - disabled:
        - "mysql"
databases:
    - sun

features:
    - mariadb: false
    - mysql: false
    - ohmyzsh: true
    - webdriver: false
    - minio: true
    - timescaledb: true

homestead: ERROR
homestead: 2002 (HY000)
homestead: : Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

Expected behavior

It should not try to create a MySQL DB when mysql has been disabled

Actual behavior

When provisionning the VM, it is trying to create a DB in MySQL, but it was previously disabled, so it can't work.

bug help wanted

All 8 comments

having the same issue. seems to be a bug because im using a yaml file from another working project.... but, i did get it to work by just removing anything about mysql. it does create the mysql db on the VM but who cares if this is for your dev env

Can you give 20.04-dev a try and see if it resolves the issue? 0c9d7fc58051c0cdadb515a4c63006c4a00a9d2f

Versions

Vagrant: Vagrant 2.2.10
Provider: Virtualbox 6.1
Homestead: release branch

Host - Win10

Similar issue but in reverse. I've disabled Postgres but it's still trying to create Postgres tables.

==> homestead: Running provisioner: Creating MySQL Database: homestead (shell)...
    homestead: Running: script: Creating MySQL Database: homestead
==> homestead: Running provisioner: Creating Postgres Database: homestead (shell)...
    homestead: Running: script: Creating Postgres Database: homestead
    homestead: createdb: error: could not connect to database template1: could not connect to server: No such file or directory
    homestead:  Is the server running locally and accepting
    homestead:  connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

@ethanclevenger91 I have a potential fix for 20.04: https://github.com/laravel/homestead/issues/1522#issuecomment-713162874

Just confirming you're on release?

@ethanclevenger91 I have a potential fix for 20.04: #1522 (comment)

Just confirming you're on release?

Give master a spin 7ef844020750deb012d3596b9b0a9aa97b896977 and let me know please.

@svpernova09 confirm this fix on 10.x, thanks! Sorry for the slow response

Was this page helpful?
0 / 5 - 0 ratings

Related issues

leandroruel picture leandroruel  路  4Comments

bironeaj picture bironeaj  路  3Comments

mattmcdonald-uk picture mattmcdonald-uk  路  3Comments

svpernova09 picture svpernova09  路  5Comments

alexdover picture alexdover  路  4Comments