Commit 3e236b4
In the mysql/mariadb templates, set MYSQL_UNIX_PORT to a hardcoded short path (#2523)
..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
## How was it tested?
Per the description in #2521, after this change `mysqld` should come up
in a >107 length path, e.g.:
```
cd ~/src/github.com/jetify-com/devbox/examples/databases/mysql
devbox services up -b
tail -1 .devbox/compose.log # This shows the socket path, which should now be /tmp/devbox/mariadb/run/mysql.sock
devbox run mysql -u root -p # Blank password - connects
```
Note: I have patched mysql and mariadb because they are essentially the
same. However whereas `mysql` respects the `MYSQL_UNIX_PORT` env
variable, `mysql` from the mariadb package does not (logged as #2522),
so the last step of this code fails:
```
cd ~/src/github.com/jetify-com/devbox/examples/databases/mariadb
devbox services up -b
tail -1 .devbox/compose.log # This shows the socket path, which should now be /tmp/devbox/mariadb/run/mysql.sock
devbox run mysql -u root -p # ERROR 2002 (HY000): Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)
```
Aside from testing, this mariadb bug is irrelevant to this patch. I just
thought I'd mention it.
---------
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: John Lago <750845+Lagoja@users.noreply.github.com>
Co-authored-by: Artem Klevtsov <a.a.klevtsov@gmail.com>
Co-authored-by: Greg Curtis <greg.curtis@jetify.com>
Co-authored-by: Daniel Loreto <279789+loreto@users.noreply.github.com>
Co-authored-by: Mike Landau <mikeland86@gmail.com>
Co-authored-by: John Lago <750845+Lagoja@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Will Brennan <will@moondev.co.uk>1 parent 9eba0e3 commit 3e236b4
File tree
4 files changed
+14
-22
lines changed- examples/databases
- mariadb
- mysql
4 files changed
+14
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | | - | |
| 15 | + | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | | - | |
| 15 | + | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
20 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
0 commit comments