Support MySQL connection through unix socket (#131)

Closes #131
This commit is contained in:
Carlo Suriano 2020-05-24 12:55:45 -07:00 committed by Adrian Macneil
parent a45d03acdb
commit 6cd39e1fba
3 changed files with 29 additions and 13 deletions

View file

@ -127,6 +127,12 @@ protocol://username:password@host:port/database_name?options
DATABASE_URL="mysql://username:password@127.0.0.1:3306/database_name"
```
A socket parameter can be specified to connect through a unix socket file:
```sh
DATABASE_URL="mysql://username:password@/database_name?socket=/var/run/mysqld/mysqld.sock"
```
**PostgreSQL**
When connecting to Postgres, you may need to add the `sslmode=disable` option to your connection string, as dbmate by default requires a TLS connection (some other frameworks/languages allow unencrypted connections by default).