Home » Questions » Computers [ Ask a new question ]

Why isn't my port forwarding with mysql working on my server?

Why isn't my port forwarding with mysql working on my server?

I have a mysql server running on some server in our network. Now, only connections from localhost are accepted by the server and I can't connect to it remotely. Now, I want to set up a port forwarding, using ssh to be able to use some GUI tools with this server. However, somehow I can not get authenticated, when I connect via tunnel! It goes like this:

Asked by: Guest | Views: 130
Total answers/comments: 2
Guest [Entry]

"Did you try using

ssh -L 33066:localhost:3306 remotemachine

?

Please make also sure that inside the mysql privilege system, both 127.0.0.1 and localhost are allowed sources for your database user."
Guest [Entry]

"Cross-post of this answer

I had a similar issue, and per this StackOverflow answer, the solution was removing the 'any' user.

It seems that MySQL sees a difference between a user connecting via localhost and 127.0.0.1, which is part of the issue if I understand it correctly."