Added Connection String Syntax & Non-Docker Example & Formatted

Kyle 2019-09-29 01:25:23 -05:00
parent 42cead302c
commit 5b573ea0d2
1 changed files with 13 additions and 2 deletions

@ -2,7 +2,11 @@ To use the MySQL backend, first ensure you build the binary [with MySQL feature
To run the binary or container ensure the ```DATABASE_URL``` environment variable is set (i.e. ```DATABASE_URL='mysql://<user>:<password>@mysql/bitwarden```) and ```ENABLE_DB_WAL``` is set to false ```ENABLE_DB_WAL='false'``` .
Example using docker
**Connection String Syntax:**
```
DATABASE_URL=mysql://[[user]:[password]@]host[:port][/database]
```
**Example using Docker:**
```
# Start a mysql container
docker run --name mysql --net <some-docker-network>\
@ -19,3 +23,10 @@ docker run -d --name bitwarden --net <some-docker-network>\
-e ADMIN_TOKEN=<some_random_token_as_per_above_explanation>\
-e ENABLE_DB_WAL='false' <you bitwarden_rs image name>
```
**Example using Non-Docker MySQL Server:**
```
Server IP/Port 192.168.1.10:3306 UN: dbuser / PW: P@ssw0rd / DB: Bitwarden
mysql://dbuser:P@ssw0rd@192.168.1.10:3306/bitwarden
```