Skip to content

Commit 06ac64d

Browse files
committed
In the mysql/mariadb templates, set MYSQL_UNIX_PORT to a hardcoded short
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 #2521
1 parent dc50eb5 commit 06ac64d

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

examples/databases/mariadb/devbox.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@
1010
],
1111
"test_db_setup": [
1212
"mkdir -p /tmp/devbox/mariadb/run",
13-
"export MYSQL_UNIX_PORT=/tmp/devbox/mariadb/run/mysql.sock",
1413
"devbox services up -b",
1514
"sleep 5",
16-
"mysql -u root < setup_db.sql",
15+
"mysql -u root --password='' < setup_db.sql",
1716
"devbox services stop"
1817
]
1918
}
2019
},
2120
"nixpkgs": {
2221
"commit": "f80ac848e3d6f0c12c52758c0f25c10c97ca3b62"
23-
}
22+
},
23+
"env": {
24+
"MYSQL_UNIX_PORT": "/tmp/devbox/mariadb/run/mysql.sock"
25+
}
2426
}

examples/databases/mysql/devbox.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@
1010
],
1111
"test_db_setup": [
1212
"mkdir -p /tmp/devbox/mariadb/run",
13-
"export MYSQL_UNIX_PORT=/tmp/devbox/mariadb/run/mysql.sock",
1413
"devbox services up -b",
1514
"sleep 5",
16-
"mysql -u root < setup_db.sql",
15+
"mysql -u root --password='' < setup_db.sql",
1716
"devbox services stop"
1817
]
1918
}
20-
}
19+
},
20+
"env": {
21+
"MYSQL_UNIX_PORT": "/tmp/devbox/mariadb/run/mysql.sock"
22+
}
2123
}

0 commit comments

Comments
 (0)