Can't connect to MariaDB server. #1208

Closed
opened 2026-04-06 01:41:30 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @xchawai on 3/1/2024

Subject of the issue

Can't connect to MariaDB server through socket or port.

Deployment environment

Debian 12
  • vaultwarden version: 1.30.3
  • Install method: Docker image

  • Clients used:

  • Reverse proxy and version: nginx

  • MySQL/MariaDB or PostgreSQL version: 11.3.2

  • Other relevant details:

Steps to reproduce

/etc/mysql# docker run -d --name vaultwarden -v /vw-data/:/data/ --restart unless-stopped -p 80:80 -e DATABASE_URL='mysql://vaultwarden:test@localhost:3306/vaultwarden' vaultwarden/server:latest

Expected behaviour

Actual behaviour

Docker container keep restarting.

Troubleshooting data

[2024-03-01 00:34:04.538][vaultwarden::util][WARN] Can't connect
to database, retrying: DieselCon.
[CAUSE] BadConnection(
"Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)",

No relevant logs found in MariaDB.

*Originally created by @xchawai on 3/1/2024* <!-- # ### NOTE: Please update to the latest version of vaultwarden before reporting an issue! This saves you and us a lot of time and troubleshooting. See: * https://github.com/dani-garcia/vaultwarden/issues/1180 * https://github.com/dani-garcia/vaultwarden/wiki/Updating-the-vaultwarden-image # ### --> <!-- Please fill out the following template to make solving your problem easier and faster for us. This is only a guideline. If you think that parts are unnecessary for your issue, feel free to remove them. Remember to hide/redact personal or confidential information, such as passwords, IP addresses, and DNS names as appropriate. --> ### Subject of the issue Can't connect to MariaDB server through socket or port. ### Deployment environment <!-- ========================================================================================= Preferably, use the `Generate Support String` button on the admin page's Diagnostics tab. That will auto-generate most of the info requested in this section. ========================================================================================= --> Debian 12 <!-- The version number, obtained from the logs (at startup) or the admin diagnostics page --> <!-- This is NOT the version number shown on the web vault, which is versioned separately from vaultwarden --> <!-- Remember to check if your issue exists on the latest version first! --> * vaultwarden version: 1.30.3 <!-- How the server was installed: Docker image, OS package, built from source, etc. --> * Install method: Docker image * Clients used: <!-- web vault, desktop, Android, iOS, etc. (if applicable) --> * Reverse proxy and version: <!-- if applicable -->nginx * MySQL/MariaDB or PostgreSQL version: <!-- if applicable -->11.3.2 * Other relevant details: ### Steps to reproduce <!-- Tell us how to reproduce this issue. What parameters did you set (differently from the defaults) and how did you start vaultwarden? --> /etc/mysql# docker run -d --name vaultwarden -v /vw-data/:/data/ --restart unless-stopped -p 80:80 -e DATABASE_URL='mysql://vaultwarden:test@localhost:3306/vaultwarden' vaultwarden/server:latest ### Expected behaviour <!-- Tell us what you expected to happen --> ### Actual behaviour <!-- Tell us what actually happened --> Docker container keep restarting. ### Troubleshooting data <!-- Share any log files, screenshots, or other relevant troubleshooting data --> [2024-03-01 00:34:04.538][vaultwarden::util][WARN] Can't connect to database, retrying: DieselCon. [CAUSE] BadConnection( "Can't connect to local server through socket '/run/mysqld/mysqld.sock' (2)", No relevant logs found in MariaDB.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/vaultwarden#1208