supysonic
supysonic copied to clipboard
How to use mysql with a socket connection?
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?
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.