databases
databases copied to clipboard
Add support for MySQL unix_socket connection option
Connection strings that specified mysql:///db?unix_socket=...
option were not passing the unix_socket
option to the underlying aiomysql connection. This meant that it was not possible to connect via UNIX domain socket unless the connection option was explicitly given to the MySQLBackend()
constructor.
This change adds the unix_socket
connection option to the explicit list of connection options recognized and extracted from the connection string.
I tested this by running a local MySQL server and adding a ?unix_socket=
connection option to the TEST_DATABASE_URLS
.
E.g. TEST_DATABASE_URLS=mysql://root@/test?unix_socket=/tmp/mysqld/mysqld.sock
@tomchristie any chance you or another maintainer can review this? Thanks
Bump I could really use this change as well
What's the status here? I think URL
has support for the unix_sock
parameter which makes this change simpler. I have a PR of my own: #503
Superseded by https://github.com/encode/databases/pull/551