Skip to content

Commit

Permalink
build(make): add a command to connect to mysql through socket file us…
Browse files Browse the repository at this point in the history
…ing the url option
  • Loading branch information
danvergara committed Mar 15, 2023
1 parent 90810c9 commit e7f2df2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ run-mysql: build
run-mysql-socket: build
./dblab --socket /var/lib/mysql/mysql.sock --user myuser --pass password --db mydb --ssl enable --port 3306 --driver mysql

.PHONY: run-mysql-socket-url
## run-mysql-socket-url: Runs the application with a connection to mysql through a socket file. In this example the socke file is located in /var/lib/mysql/mysql.sock.
run-mysql-socket-url: build
./dblab --url "mysql://myuser:password@unix(/var/lib/mysql/mysql.sock)/mydb?charset=utf8"

.PHONY: run-sqlite3
## run-sqlite3: Runs the application with a connection to sqlite3
run-sqlite3: build-sqlite3
Expand Down

0 comments on commit e7f2df2

Please sign in to comment.