mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-02-24 19:07:44 +03:00
DATABASE_URL not recognized as mysql? #533
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @pdarcos on GitHub (Dec 20, 2019).
Hi,
I built the bitwarden_rs binary with mysql according to the wiki, but when I try to run it it seems to not recognize my DATABASE_URL as mysql and exits.
What's the proper way to pass the DATABASE_URL environment variable when starting the project (not in docker)?
./bitwarden_rs -e DATABASE_URL='mysql://bitwarden_rs:secretpass@localhost:3306/bitwarden_rs'
Error loading config:
DATABASE_URLshould start with mysql: when using the MySQL serverThanks
@pdarcos commented on GitHub (Dec 20, 2019):
Answering myself so future readers don't waste time:
I had to set the DATABASE_URL variable in the .env file and now it works. Apparently you cannot pass it environment variables on the command line when not using the docker image.
@mqus commented on GitHub (Dec 20, 2019):
btw, if you want to pass a variable like
DATABASE_URLtobitwarden_rsor any other executable, you can do so by starting it in a shell withI'm not sure if that works in a standard windows terminal/powershell but it works everywhere else.
But I recommend setting it in the
.envfile because you usually want to set multiple options and preprending them can get messy fast.