Access MySQL server over SSH tunnel using Navicat

Today was my first time to access a MySQL server over a SSH tunnel in Navicat. After a bit of trial and error I was finally able to achieve success 🙂

Here are the main things I learned:

#1 On the client machine running Navicat, use the same credentials that you would use if you were at the console of the remote server. In this case localhost and port 3306

Use the credentials that are local to the remote server

Use the credentials that are local to the remote server

#2 On the SSH tab, use the remote server’s IP and SSH login credentials

Use the remote server's IP and approriate SSH login credentials

Use the remote server’s IP and appropriate SSH login credentials (for security purposes you will probably want to NOT save the password)

#3 For the client machine, make sure a MySQL server instance is not running. Otherwise you will get an error similar to this:

80070007: SSH Tunnel: Socket error on connecting. WSAGetLastError return 10061($274D)

80070007: SSH Tunnel: Socket error on connecting. WSAGetLastError return 10061($274D)

This is due to the 3306 port already being bound to the client’s MySQL server instance and so the tunnel cannot bind properly to that port. 🙁 Repeat, make sure to have port 3306 free if you will be SSH tunneling it 🙂

Hopefully these tips are helpful to you and if you want more info checkout the links below:

php – Lost connection to MySQL server at ‘reading initial communication packet’, system error: 0 – Stack Overflowhttp://stackoverflow.com/questions/5755819/lost-connection-to-mysql-server-at-reading-initial-communication-packet-systeAlso, somehere here: http://forums.mysql.com/read.php?52,151255,213970#msg-213970 suggests that it might be because the MySQL server is bound to the loop-back IP (127.0.0.1 / localhost) which…
linux – Using Navicat to login to Postgresql via SSH – what are the correct settings? – Stack Overflowhttp://stackoverflow.com/questions/12989838/using-navicat-to-login-to-postgresql-via-ssh-what-are-the-correct-settings“could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host “localhost” and accepting TCP/IP connections on port 60122? received invalid response to SSL…
MySQL connection over SSH tunnel – Stack Overflowhttp://stackoverflow.com/questions/11061621/mysql-connection-over-ssh-tunnelbind-address = 127.0.0.1 # Next addr differs slightly, but anyway bind-address = 99.99.99.99 Now about the tunnel. It connects the following:(A) localhost(9989) -> (B) localhost(3306) But when…
Access Your MySQL Server Remotely Over SSH

Access Your MySQL Server Remotely Over SSHhttp://www.howtogeek.com/howto/ubuntu/access-your-mysql-server-remotely-over-ssh/So instead, we’ll just use port-forwarding through an SSH tunnel, so your MySQL client thinks it’s connecting to your localhost machine, but it’s really connecting to the other…

2 comments

Leave a Reply to J.D. H. Cancel reply

Your email address will not be published. Required fields are marked *