-
Notifications
You must be signed in to change notification settings - Fork 380
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
MySQL connection refused using Unix Socket #1065
Comments
This question is targeted at MySqlConnector, the underlying library used by Pomelo for MySQL communication. To use Unix sockets, you need to set the connection
See MySQL .NET Connection String Options for further details. |
You are really awesome Lauxjpn, I really wish this was in Pomelo document and samples to save a lot of times, I was not aware that Pomelo is using MySqlConnector underneath @lauxjpn |
Unfortunately, both documentation and samples are lacking at the moment. We really need to improve upon that before the .NET 5 release. I provided a lot of sample code inside of issues, but we should consolidate them into multiple samples and make them part of the repo.
It is stated on our main repo page, but there is a lot of stuff there and its easy to overlook. |
@mason-chase This is a community project, so if you wish to contribute your PR would be welcomed. |
I'm trying to connect to MySql server through Unix Socket instead of TCP for maximizing connection and reducing processing load.
My Asp Net Core app is running in Docker Swarm and I'm running Percona docker
I'm sharing mysqld.sock using volume sharing and on Asp Net core container I am able to login to console and make connection to the server using mysql client
/var/run/mysqld/mysqld.sock
However when Asp Net Core application is trying to connect to server it is switching from localhost to 127.0.0.1:3306 even though I set no port and
SslMode=none
Any help is much
Further technical details
MySQL version: 5.7
Operating system: ubuntu:latest
Pomelo.EntityFrameworkCore.MySql version: 3.1.1
Microsoft.AspNetCore.App version: 3.1
The text was updated successfully, but these errors were encountered: