How to Connect to MySQL via SSH Tunnel in Windows

In this tutorial i will let you know how to connect workbench or other tool with your live server database. This is very helpful if you want to work on mysql server tool, for this you must have server credential as well as db credential.We will connect MySQL via SSH Tunnel in Windows with help of PUTTY.

We need following information to connect SSH tunnel with windows.

1- We need server IP.
2- Server credential with root access.
3- We need dbuser,password and database name.

MySQL connection over SSH tunnel

There are following steps need to connect MYsql with ssh tunnel.

Step 1: First we will open putty and configure connection parameters in putty.


Step 2: Now we will click connection->SSH->tunnel.


Step 3: Added host name and port and add into tunnel.


Step 4: Click Apply button and now click open button on putty.

Step 5: Here we will login in putty as a root access user.

Now you have connected with your server, so next will be how to access server database with workbench. There are following steps need to follow.

Step 1: We will open workbench.
Step 2: We will click add new connection icon.
Step 3: Here we will fill connection name, Host name and your server user name.

Step 4: click test connection button, if you will get parameters correct then its fine and you will find workbench dashboard.
Step 5:Now you need to click connection name which you have created above on workbench dashboard.
Step 6: He will ask password you put your server database password.

Now you will see after short moment you are on your server mysql databases.