Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for MySQL unix_socket connection option #239

Closed

Conversation

coryvirok
Copy link

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
Copy link
Author

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
Copy link
Author

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

@afgarcia86
Copy link

Bump I could really use this change as well

@ryanrasti
Copy link

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

@zanieb
Copy link
Contributor

zanieb commented Jul 12, 2023

Superseded by #551

@zanieb zanieb closed this Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants