Skip to content

Commit

Permalink
In the mysql/mariadb templates, set MYSQL_UNIX_PORT to a hardcoded short
Browse files Browse the repository at this point in the history
path rather than plugin's project-relative path, to avoid triggering
'The socket file path is too long (> 107)' error on start. Also specify
the (blank) password in 'test_db_setup'. Fixes jetify-com#2521
  • Loading branch information
jefft committed Feb 17, 2025
1 parent dc50eb5 commit 06ac64d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions examples/databases/mariadb/devbox.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@
],
"test_db_setup": [
"mkdir -p /tmp/devbox/mariadb/run",
"export MYSQL_UNIX_PORT=/tmp/devbox/mariadb/run/mysql.sock",
"devbox services up -b",
"sleep 5",
"mysql -u root < setup_db.sql",
"mysql -u root --password='' < setup_db.sql",
"devbox services stop"
]
}
},
"nixpkgs": {
"commit": "f80ac848e3d6f0c12c52758c0f25c10c97ca3b62"
}
},
"env": {
"MYSQL_UNIX_PORT": "/tmp/devbox/mariadb/run/mysql.sock"
}
}
8 changes: 5 additions & 3 deletions examples/databases/mysql/devbox.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
],
"test_db_setup": [
"mkdir -p /tmp/devbox/mariadb/run",
"export MYSQL_UNIX_PORT=/tmp/devbox/mariadb/run/mysql.sock",
"devbox services up -b",
"sleep 5",
"mysql -u root < setup_db.sql",
"mysql -u root --password='' < setup_db.sql",
"devbox services stop"
]
}
}
},
"env": {
"MYSQL_UNIX_PORT": "/tmp/devbox/mariadb/run/mysql.sock"
}
}

0 comments on commit 06ac64d

Please sign in to comment.