supysonic icon indicating copy to clipboard operation
supysonic copied to clipboard

How to use mysql with a socket connection?

Open nicklan opened this issue 8 months ago • 1 comments

I'd like to try out supysonic, but I need it to connect to a mysql db over a socket at a file path (not via host:port). Looking at the code it seems to use urlparse to load the string, so I'm wondering if that's even possible?

nicklan avatar Apr 14 '25 17:04 nicklan

Hello. Specifying local paths on the database URI is possible, the best example would be SQLite as it only works with files. Have you tried setting something like mysql:////path/to/your/unix/socket? (note the four forward slashes after the scheme) If it doesn't work it's probably because the mysql connection constructor expect the socket path to be provided on a specific named parameter, and that shouldn't be hard to fix.

spl0k avatar Apr 15 '25 07:04 spl0k