MySQL Workbench not connecting over SSH
Asked Answered
E

6

6

I installed a server using Laravel Forge. Authentication is via SSH keys which I provided.

I can connect to the server via putty with my private key. Also am able to connect to the mysql using the mysql password.

But when I try to do the same in Mysql Workbench I get this:

enter image description here

My keys are in .ppk format. The keys don't have a password.

I have no idea what to do. Please assist.

Eyecatching answered 9/10, 2014 at 20:37 Comment(0)
H
12

I don't know if that applies here, but if you use an older version of MySQL Workbench try the latest one (currently 6.2). For the SSH connection: you need an OpenSSH type key, not putty (ppk). You can use putty to convert to OpenSSH format, however.

Hawkbill answered 10/10, 2014 at 7:13 Comment(0)
C
4

I would like to complement Mike's answer, and include the step-by-step for those who don't know the use of Putty to perform the conversion that Mike refers to.

Open the PuTTYgen program > Conversions > Import Key > 'Select your key with the .ppk format' > Export OpenSSH> Select the directory and save the new format.

Use this file into mysql worckbench and it will work.

Continuative answered 24/6, 2020 at 2:55 Comment(0)
J
1

The problem is indeed that the "MYSQL Hostname" needs to be "localhost" or "127.0.0.1".

Jean answered 3/11, 2014 at 15:9 Comment(0)
D
0

The MySQL hostname must be relative to the SSH server. If your MySQL server is on the same machine as the SSH server, try using 'localhost' instead of your SSH server's IP.

Dusk answered 9/10, 2014 at 20:42 Comment(5)
Tried it. Same resultEyecatching
Could you check your MySQL's my.ini? Make sure that --skip-networking is not set to 'yes'. For this to work, your MySQL should have TCP/IP enabled. After this, check if 3306 is open (it should be) using: telnet localhost 3306Dusk
Will do it in ~12 hrs. But i think it is. It's a laravel forge installationEyecatching
I think it's possible bc something between workbench and SSH. cos it can't even connect to the serverEyecatching
If you just want to connect to SSH, you might want to try SSH tunneling your connection to MySQL.Dusk
L
0

For me, the default package in ubuntu 18.04 using "apt install mysql-workbench" install the v6.3.8 that have a bug with ssl/tunnel connection (along with the 6.3.9)... I purged/unistalled it and installed the latest deb version from the website https://dev.mysql.com/downloads

Liaoning answered 20/12, 2018 at 16:44 Comment(0)
G
0

Documentation how to connect Mysql in EC-2 instances through MySQL Work bench.

Step-1

You have a PPK key from that you can connect using putty. you need to open the putty Gen and Load the PPK Key

Step-2

Open the Conversion button and choose the SSH conversion

and Save the file to your directory

Step-3

open the mysql work bench and choose the connection method using tcp/ip over ssh

enter the credentials for ssh

step-4

particulary for entering the credentials of mysql you need to write 127.0.0.1 and port 3306 along with username and password

Now You Can connect to MySQL Database through MySQL work bench

Gloriane answered 27/7, 2023 at 15:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.