mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-04-26 09:46:00 +03:00
[GH-ISSUE #773] DATABASE_URL not recognized as mysql? #532
Labels
No labels
SSO
Third party
better for forum
bug
bug
documentation
duplicate
enhancement
future Vault
future Vault
future Vault
good first issue
help wanted
low priority
notes
pull-request
question
troubleshooting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vaultwarden#532
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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).
Original GitHub issue: https://github.com/dani-garcia/vaultwarden/issues/773
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.