mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-12-09 17:23:04 +03:00
vaultwarden can't connect to mysql with non-standard socket #1050
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 @tessus on GitHub.
Subject of the issue
I have set
socket=/data/mysql8/mysql8.sockin/etc/my.cnf. When I try to start vaultwarden, it logs the following error:In my mysql connection string I have specified
@localhost, which means it also ignores the port number, sincelocalhosthas a special meaning (use a socket).Deployment environment
Your environment (Generated via diagnostics page)
Config (Generated via diagnostics page)
Show Running Config
Environment settings which are overridden:
Steps to reproduce
/var/lib/mysql/mysql.sock.Expected behaviour
It should connect to the database.
Actual behaviour
It does not connect to the database. Error message in log file:
Troubleshooting data
@BlackDex commented on GitHub:
See #2757
@BlackDex commented on GitHub:
That could probably work when v2 of diesel is added. It is the default of course.
@tessus commented on GitHub:
Thanks for the info. I seearched the forum, but didn't find anything. The discussions yielded above ticket
Support Unix socket ?, but I didn't read it since IMO the unix socket is working. Thus I never read it.Btw, a string like
works with sockets, but it only looks for the socket at
/var/lib/mysql/mysql.sock@Necoro commented on GitHub:
Btw: According to the diesel docs, the path it looks for is
/tmp/mysql.sock. I have configured my Docker to bind my mysql socket to that file and it works like a charm.