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 unix socket connection #115

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

bcardiff
Copy link
Member

Before this PR connection strings were usually in the form mysql://root@localhost/test

After this PR that still works by we allow

  • to specify database as a query parameter mysql://root@localhost?database=test
  • to use unix sockets when uri don't have a host (there are 3 /) mysql:///path/to/mysql.sock?database=test. initial database always need to be a query param for unix socket.
  • user/pass can still be specified as mysql://user:pass@/path/to/mysql.sock

This is a breaking change if you relied on manual setup the connection MySql::Connection::Options has changed a bit. That's the only breaking change in this PR regarding public API.

The CI will now use native mysql because there is no way to use socket via docker AFAIK. And mysql 5.6 is dropped from CI because some small amount of specs where failing, but also EOL.

The goal is to keep working on more transport options that will enable better mysql 8.0 support.

Closes #63
Closes #94

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.

how to connect to mysql via unix_socket?
1 participant