Reputation: 10039
I'm using OSX and I have problem to connect MySQL workbench to my vagrant.
I have this configuration:
the vagrant password is vagrant and the mysql password is root
And I have this error
I don't know really if the error is on the mysql connection or ssh connection
ssh [email protected]
works
I have an error when MySQL workbench is connecting to ssh
14:58:42 [INF][ SSH tunnel]: Existing SSH tunnel not found, opening new one
14:58:42 [INF][ SSH tunnel]: Opening SSH tunnel to 33.33.33.15
14:58:42 [ERR][sshtunnel.py:notify_exception_error:233]: Traceback (most recent call last):
File "/Applications/MySQLWorkbench.app/Contents/Resources/sshtunnel.py", line 257, in _connect_ssh
self._client.load_host_keys(os.path.expanduser(ssh_known_hosts_file))
File "/Applications/MySQLWorkbench.app/Contents/Resources/libraries/paramiko/client.py", line 176, in load_host_keys
self._host_keys.load(filename)
File "/Applications/MySQLWorkbench.app/Contents/Resources/libraries/paramiko/hostkeys.py", line 155, in load
e = HostKeyEntry.from_line(line)
File "/Applications/MySQLWorkbench.app/Contents/Resources/libraries/paramiko/hostkeys.py", line 67, in from_line
key = RSAKey(data=base64.decodestring(key))
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/base64.py", line 321, in decodestring
return binascii.a2b_base64(s)
Error: Incorrect padding
14:58:42 [INF][ SSH tunnel]: TunnelManager.wait_connection returned OK
14:58:42 [INF][sshtunnel.py:set_keepalive:471]: SSH KeepAlive setting skipped.
14:58:42 [INF][ SSH tunnel]: SSH tunnel connect executed OK
I already try to edit my.cnf on my vagrant commenting bind-address or setting bind-address to 0.0.0.0 but I have the same problem.
Edit: I have the same error on a real server
Upvotes: 2
Views: 4466
Reputation: 66
This might be due to an incompatibility in the underlying paramiko
python lib, that doesn't support newer key exchange methods (i.e. ECDH) of your server...
Unfortunately until today, the MySQL-dev didn't upgrade their lib.
A possible workaround would be to create the ssh tunnel yourself:
ssh -L 3306:localhost:3306 [email protected]
And then connect directly via MySQL-Workbench to localhost:3306
.
Upvotes: 2
Reputation: 179
I had this same issue today and tracked it down to being an offensive entry in my ~/.ssh/known_hosts file.
A way to troubleshoot this is by moving ~/.ssh/known_hosts to ~/.ssh/known_hosts_test and then trying your connection in MySQL Workbench again.
I found that a recent host I connected to left me with a known_hosts entry that MySQL workbench didn't like. The error message in the logs was the same as yours, and simply killing the last couple of entries in known_hosts fixed the issue for me.
Cheers!
Upvotes: 2