Question

Unable to connect to MySQL Workbench

  • Posted December 3, 2014

I’ve been trying to connect my mysql db through workbench over SSH, but I can’t seem to get it to work.

I keep getting the error “Could not connect the SSH Tunnel, please check username and password.” and right after that error “Failed to connect to MySQL at 127.0.0.1:3306 through SSH tunnel at [my droplet ip] with user root”

What I have at the moment: SSH Hostname: [droplet ip] SSH username: root SSH password is blank SSH key file: [private key path] MySQL hostname: 127.0.0.1 MySQL port: 3306 username: root password: [mysql user root password]

I’ve already tried switching the bind-address and the MySQL hostname to 0.0.0.0, but nothing changed. I also checked if port 3306 is occupied but that wasn’t the case.

Also at workbench server connection editor there are 2 extra tabs, Remote Management and System Profile. Do I have to do something there or should I choose, Do not use remote management?

Thank you

Subscribe
Share

I was running in to the same problem and found a solution here.

Basically, you need to convert your Putty key to an OpenSSH format using PuttyGen.

Hope this helps!

@nlajaysingh I couldn’t find anything. I set it up in Sequel Pro, which still took some time, but it worked out. Kind of glad because I used Sequel Pro’s import tool and it made my life easier and saved some of the time I lost fiddling with this problem.

@Ken210 Unfortunately I haven’t. My workaround was to forward engineer it from Workbench, copy the script and import it through phpmyadmin.

@nlajaysingh Did you ever get this resolved using Workbench? I am having the same problem.

Okay…at any rate, you should have a pair of keys (two files) . I am suggesting to try the other one that you have not tried yet, when setting up your connection in MySQL WorkBench

@sieracircle I’ve unchecked it but it still ain’t giving me any extension. If I right click the private ssh key file and go to its properties, it shows that the file type is “File”.

In Windows, I think you have to go to Folder Options and uncheck “Hide Extensions for Known File Types” in order to see file extensions…

I’m using port 22. I’m not seeing any file extension for my public key. I only see the file extension on the private key which is .ppk. I’ve not used DSA but SSH RSA. I’ve followed this tutorial for generating my ssh key: https://www.digitalocean.com/community/tutorials/how-to-create-ssh-keys-with-putty-to-connect-to-a-vps.

do you use an alternative port for SSH? is the key you have set the public key: id_dsa.pub or whatever…should end in .pub ?

@sierracircle Yes, I’m using putty with a SSH key to access the droplet terminal.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

This question was answered by @pietervdheuvel:

I was running in to the same problem and found a solution here.

Basically, you need to convert your Putty key to an OpenSSH format using PuttyGen.

Hope this helps!

View the original comment