I'm in a bit of a bind here. I have a client that wants me to set up his website, but he runs the server w/ SSH and CentOS 6.2 as its OS.

Now, I'm trying to add the SQL server on MySQL Workbench for easy handling, but I can't connect to MySQL. The SSH connection works fine, and I get privileges with sudo, so to speak.

The server guy said (and I use PuTTY by the way ): Open a tunnel on port 3306 (source) to dest: which is the MySQL port.

I have the user as "root" and have tried with the password I use to log on to my local SQL (phpmyadmin) as root, and I've tried with no password.

He also mentioned that the MySQL server only responds to loopback.

After this I haven't gotten a hold of him, and have very limited time. If you have pointers / suggestions or help I'd be very glad.

After countless hours of failure, I noticed I had used the wrong username for the MySQL connection inside Workbench. I used the same as my SSH login, which was wrong in my case. I had to use my dedicated MySQL username (obviously).

closed as off-topic by Jeff Schaller, Anthon, GAD3R, Satō Katsura, roaima Sep 25 '16 at 21:40

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – Jeff Schaller, Anthon, GAD3R, Satō Katsura, roaima
If this question can be reworded to fit the rules in the help center, please edit the question.


With PuTTY, configure the tunnel info as provided by the server guy (Connection -> SSH -> Tunnels). But use whatever hostname and user/password that you would for a "regular" SSH connection, which you say works fine.

You don't need a root SSH login to the CentOS server, just your own SSH login. The tunnel lets Mysql Workbench talk to MySQL as if it were running on your own local machine.

... or are you saying that you have the SSH tunnel established, but you cannot login successfully to MySQL?

  • That was indeed the problem, yes. But I managed to make the connection because silly me user the wrong username on the Mysql connection. I used the same I did to establish the SSH connection, but I had a different username for the Mysql connection. – Oyvind Andersson Jun 19 '12 at 9:02
  • But the problem I had first off, was fixed with your solution (using proper tunnel), so the answer given here is correct in a sense. Thanks – Oyvind Andersson Jun 19 '12 at 9:05

I used my SSH login for the Mysql connection in workbench, which in my case was an error, as I had a dedicated Mysql login username and password. I also had to specify the scheme I was logging in to.

Not the answer you're looking for? Browse other questions tagged or ask your own question.