Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mariadb service not starting on macOS #2023

Open
JoyceBabu opened this issue Apr 25, 2024 · 1 comment
Open

Mariadb service not starting on macOS #2023

JoyceBabu opened this issue Apr 25, 2024 · 1 comment
Labels
bug Something isn't working triage Issue needs triage

Comments

@JoyceBabu
Copy link
Contributor

What happened?

mariadb service fails to start on macOS. The following command is not working

mysqld --log-error=$MYSQL_HOME/mysql.log & MYSQL_PID=$! && echo 'Starting mysqld... check mariadb_logs for details'

It works if I remove the & MYSQL_PID=$! assignment

Steps to reproduce

Command

services

devbox.json

{
  "packages": [
    "path:devbox.d/php#php",
    "path:devbox.d/php#php.packages.composer",
    "apacheHttpd@latest",
    "mariadb@latest",
    "nodejs-18_x@latest",
    "yarn@latest",
    "jq@latest",
    "redis@latest",
    "podman@4"
  ],
  "env": {
    "DEVBOX_COREPACK_ENABLED": "true",
    "DOCUMENT_ROOT": "$PWD/public_html",
    "HTTPD_PID_FILE": "$PWD/.devbox/virtenv/apacheHttpd/apache2.pid",
    "HTTPD_PORT": "8080",
    "HTTPD_SECURE_PORT": "8443",
    "HTTPD_SSLDIR": "$PWD/.devbox/virtenv/apacheHttpd/ssl",
    // Redis fails to starts without this
    "LANG": "",
    // "MYSQL_HOME": "$PWD/devbox.d/mysql",
    // "MYSQL_PID_FILE": "$PWD/.devbox/virtenv/mariadb/run/mysql.pid",
    // "MYSQL_UNIX_PORT": "$PWD/.devbox/virtenv/mariadb/run/mysql.sock",
    "PHP_CONFDIR": "$PWD/conf/php",
    "PHPFPM_ERROR_LOG_FILE": "$PWD/logs/php-fpm.log",
    "PHPFPM_PORT": "9001",
    "PROJECT_DIR": "$PWD"
  },
  "shell": {
    "init_hook": [
      // "source conf/set-env.sh"
    ]
  },
  "nixpkgs": {
    "commit": "f80ac848e3d6f0c12c52758c0f25c10c97ca3b62"
  },
  "include": [
    "plugin:php",
    "path:devbox.d/podman/plugin.json"
  ]
}

Devbox version

0.10.5

Nix version

nix (Nix) 2.22.0

What system does this bug occur on?

macOS (Intel)

Debug logs

No response

@JoyceBabu JoyceBabu added bug Something isn't working triage Issue needs triage labels Apr 25, 2024
@JoyceBabu
Copy link
Contributor Author

Interestingly, the command works when directly executed in terminal.

Usually MYSQL_PID is immediately defined, when you need to wait on the process, or to call killall $MYSQL_PID after calling mysqlshutdown. Since devbox is using neither of them, is it required?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Issue needs triage
Development

No branches or pull requests

1 participant