Skip to content

Commit 13a8851

Browse files
committed
Provide a command 'alias' for mysql and mariadb that respects MYSQL_UNIX_PORT, since strangely, the native binaries do not (jetify-com#2522). Also specify the root user/password.
1 parent dc50eb5 commit 13a8851

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

examples/databases/mariadb/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## mariadb Notes
44

55
1. Start the mariadb server using `devbox services up`
6-
1. Create a database using `"mysql -u root < setup_db.sql"`
6+
1. Create a database using `"devbox run mysql < setup_db.sql"`
77
1. You can now connect to the database from the command line by running `devbox run connect_db`
88

99
## Services

examples/databases/mariadb/devbox.json

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
"shell": {
66
"init_hook": [],
77
"scripts": {
8+
"mysql": [
9+
"mysql --socket=$MYSQL_UNIX_PORT --user=root --password=''"
10+
],
11+
"mariadb": [
12+
"mariadb --socket=$MYSQL_UNIX_PORT --user=root --password=''"
13+
],
814
"connect_db": [
915
"mysql -u devbox_user -p -D devbox_lamp"
1016
],

0 commit comments

Comments
 (0)