databases icon indicating copy to clipboard operation
databases copied to clipboard

Add support for MySQL unix_socket connection option

Open coryvirok opened this issue 4 years ago • 4 comments

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.

coryvirok avatar Aug 22 '20 18:08 coryvirok

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

coryvirok avatar Aug 22 '20 18:08 coryvirok

@tomchristie any chance you or another maintainer can review this? Thanks

coryvirok avatar Nov 11 '20 16:11 coryvirok

Bump I could really use this change as well

afgarcia86 avatar Jun 14 '21 00:06 afgarcia86

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

ryanrasti avatar Aug 04 '22 00:08 ryanrasti

Superseded by https://github.com/encode/databases/pull/551

zanieb avatar Jul 12 '23 01:07 zanieb