You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried the mariadb example per instructions and couldn’t get the db to connect. I only decided to try this because a devbox I had working with mariadb stopped working and I wanted to see if a basic example worked. I don’t know if this is a package problem or not.
Perhaps a clue is that after the fresh install if I try devbox services up then package compose shows mariadb_logs restarting incessantly because no log file at .devbox/virtenv/mariadb/run/mysql.log exists. If I create a file there then mariadb_logs starts and stays going but I never see anything in the log.
Steps to reproduce
Copy mariadb example to separate folder cp -R devbox/examples/databases/mariadb ./devbox-exampe-mariadb
ERROR 2002 (HY000): Can't connect to local server through socket '/tmp/devbox/mariadb/run/mysql.sock' (2)
Error: error running script "test_db_setup" in Devbox: exit status 1
The test_db_setup command is defined in devbox.json as:
So Mariadb failed to start (the devbox services up -b line). Perhaps you already had a mysql listening on port 3306? The real reason can be found in .devbox/compose.log. But the script powered on, got to the mysql line, then failed when no socket was listening.
IMO test_db_setup should be removed. Starting a database is a failure-prone business (e.g. #2521, or if port 3306 is used) and devbox services up -b is not script-friendly, hiding errors and not setting the exit code. It's better to test things manually:
tail -f .devbox/compose.log &# watch for mariadbd errors
devbox services up -b # start mariadbd in the background
devbox run mariadb --socket=$MYSQL_UNIX_PORT --user=root --password=''# Connect as root, avoiding bug #2522
What happened?
I tried the mariadb example per instructions and couldn’t get the db to connect. I only decided to try this because a devbox I had working with mariadb stopped working and I wanted to see if a basic example worked. I don’t know if this is a package problem or not.
Perhaps a clue is that after the fresh install if I try
devbox services up
then package compose shows mariadb_logs restarting incessantly because no log file at.devbox/virtenv/mariadb/run/mysql.log
exists. If I create a file there then mariadb_logs starts and stays going but I never see anything in the log.Steps to reproduce
cp -R devbox/examples/databases/mariadb ./devbox-exampe-mariadb
devbox install
devbox run test_db_setup
Command
run
devbox.json
Devbox version
0.10.1
Nix version
nix (Nix) 2.17.1
What system does this bug occur on?
macOS (Intel)
Debug logs
The text was updated successfully, but these errors were encountered: