-
Notifications
You must be signed in to change notification settings - Fork 333
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
Replace UnixEndPoint
with UnixDomainSocketEndPoint
#1160
Comments
MySqlConnector always sends a handshake response packet (when connecting via any protocol, including Unix sockets), which contains a "username" field. In the SO poster's case, it will contain the empty string. The MariaDB documentation makes it sound as if the client doesn't need to provide a user name:
Maybe client libraries are supposed to implicitly set the user name to |
That's really not clear to me either, some examples show the command line client with the The MySQL plugin documentation shows how to map a DB user to a different OS user which necessitates providing the user. Maybe the answer is when connection protocol is set to unix and user is empty then just replace it with Would you be able to do a packet capture on mysql client without user to see what is sent in the handshake response packet? |
https://dev.mysql.com/doc/refman/8.0/en/user-names.html
https://dev.mysql.com/doc/c-api/8.0/en/mysql-real-connect.html
Sounds like the official
I filed a suggestion for this improvement: #1161. |
Signed-off-by: Bradley Grainger <bgrainger@gmail.com>
Signed-off-by: Bradley Grainger <bgrainger@gmail.com>
Implemented in 2.1.9. |
Summary: This diff grabs changes from original connector that were made in 2.1.9 release: - Use UnixDomainSocketEndPoint. Fixes mysql-net#1160 - Add SingleStoreSslMode.Disabled. Fixes mysql-net#1168 - Implement SingleStoreAttribute.Clone. Fixes mysql-net#1169 - Update activity status on failure SingleStoreDataReader - Use net7.0 (update .csproj files and CI config.yml) - Use new C# 11 features (e.g. string literals, list patterns, Regex generator) - Updating different packages Test Plan: https://app.circleci.com/pipelines/github/memsql/SingleStoreNETConnector/255/workflows/5ffa09c8-5b07-4c58-81b9-68e98d9c3557 Reviewers: pmishchenko-ua Subscribers: engineering-list JIRA Issues: PLAT-6408 Differential Revision: https://grizzly.internal.memcompute.com/D61770
Summary: This diff grabs changes from original connector that were made in 2.1.9 release: - Use UnixDomainSocketEndPoint. Fixes mysql-net#1160 - Add SingleStoreSslMode.Disabled. Fixes mysql-net#1168 - Implement SingleStoreAttribute.Clone. Fixes mysql-net#1169 - Update activity status on failure SingleStoreDataReader - Use net7.0 (update .csproj files and CI config.yml) - Use new C# 11 features (e.g. string literals, list patterns, Regex generator) - Updating different packages Test Plan: https://app.circleci.com/pipelines/github/memsql/SingleStoreNETConnector/255/workflows/5ffa09c8-5b07-4c58-81b9-68e98d9c3557 Reviewers: pmishchenko-ua Reviewed By: pmishchenko-ua Subscribers: engineering-list JIRA Issues: PLAT-6408 Differential Revision: https://grizzly.internal.memcompute.com/D61770
While looking into https://stackoverflow.com/questions/71742985 I noticed that
OpenUnixSocketAsync()
uses the UnixEndPoint class that was added with PR #119 back in 2016.MySqlConnector/src/MySqlConnector/Core/ServerSession.cs
Lines 1139 to 1186 in e5cc811
Since .NET Standard 2.1 the UnixDomainSocketEndPoint class is available which should provide the same functionality as
UnixEndPoint
that was copied from Mono.It probably doesn't offer any benefits other than code maintainability, but if the code implementing Unix Domain Sockets can easily switch to the new class that would be worthwhile. The Postgres driver also made this switch in npgsql/npgsql#3314,
The question as to why the
uid
option is needed in the connection string for the unix socket authentication plugin to work is another issue which I asked the OP to submit.The text was updated successfully, but these errors were encountered: