-
Notifications
You must be signed in to change notification settings - Fork 440
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
[BUG] Can't connect to MySQL server using host and port. #434
Comments
Hi @speller, did you try with 127.0.0.1 ?? |
Same issue and worked with local ip address. Would be cool to support |
Hi @peterquiel, this is not a MyDumper issue, this is related to MySQL library which use the socket when localhost is used. I think that the error message is clear:
|
@davidducos I would disagree here. The user intended to connect to localhost but they see an irrelevant (from the user's perspective) misleading error message. The user did not ask the tool to connect by sockets. If I pass a network address I want it to connect by TCP. If the tool internally decides to ignore this intention and use sockets, it's the tool's problem, not mine. And I as a user don't care why it happens and what underlying libraries are responsible for this. |
Hi @speller , |
@speller Agree, on a high level, and a perfect world ;-) Seriously, if this was a tool I have to pay for, I would expect this to be handled .. let's say better. Dumped a 12GB database yesterday within minutes and the constraint was bandwidth. Fast, reliable, works, helps! |
@davidducos sorry, wrong wording. As from the user perspective, hostname and network address are very close in the meaning, almost synonyms. At the same time, when I write the I understand the root cause, but what if adding a simple workaroung and substitute the The reason why I need localhost is because I'm running databases in a docker container and exposing ports to the localhost, so no sockets available. I also may setup an ssh tunnel to a remote database that has no public network access. It will also open a port on the local machine with no sockets available. Anyways, I'm not trying to say that something wrong with the tool. Sorry if I was rude. I'm appreciated a lot for it. This is a great tool essential for dealing with large datasets. It does its work perfectly! Just wanted a small fix that will not drop a tint on it when you just start using it and is not aware of this issue. The issue is counter-intuitive and the error message doesn't clarify why it doesn't work with localhost. |
Hi @speller, You weren't rude, you were complaining, and it is ok, sometimes it is frustrating. The good thing here, is that you were able to explain what was YOUR problem! now, we can work in a solution. |
@davidducos I think it will be good to implement the Imagine if a user has a locally installed database with a socket AND an ssh tunnel to a remote database. And they try to connect to the remote one. Mydumper will effectively ignore host and port settings and connect to a completely different database with no hints or warnings about why it happened. Which is unacceptable from the user's perspective. THIS will break things, not localhost to ip substitution. And this is much worse than some users complaining that the tool stopped connecting to the socket when configured to connect to localhost. There's no issue to document this fix. People should not configure the tool to connect to localhost when they need a socket. Maybe it is worth forcing the Not sure what's the default behavior, but does it connect to the socket if the |
@speller About defaults, according to https://dev.mysql.com/doc/c-api/8.0/en/mysql-real-connect.html:
That is why I'm not going to change MyDumper default behavior, as I stated on my previous messages. |
Mydumper doens't respect
--host
and--port
settings and always tries to connect by MySQL socket:The text was updated successfully, but these errors were encountered: