Mariadb connection issue

Hi folks,

Just setup an instance of Bitwarden_rs and decided it would be a good idea to run it on an existing instance of mariadb.

Here’s my connection url:

  • DATABASE_URL=mysql://bitwarden:password@mariadb/bitwarden

where the database is ‘bitwarden’, the user is ‘bitwarden’, and the password is ‘password’. I’ve already created the database and user, and tested that they work.

mariadb is the name of the container running mariadb, and they are running on a common network, traefik_proxy

Here’s my error:

[2021-04-16 05:51:57.148][bitwarden_rs::util][WARN] Can’t connect to database, retrying: DieselConError.

[CAUSE] BadConnection(

“Access denied for user ‘bitwarden’@‘vpn.traefik_proxy’ (using password: YES)”,

I can’t figure out why it’s trying to connect to ‘vpn.traefik_proxy’. I do have another container called vpn, but it’s not referenced anywhere in my compose section.

Any ideas?

It isn’t trying to connect to vpn.traefik_proxy, it is connecting from vpn.traefik_proxy.
And that host isn’t allowed by the user access configured in the database.

If you use a % as host in MySQL/MariaDB it will allow from any host. I think currently it is configured with something like localhost or a specific IP or something.