Connect MySQL database from MySQL Workbench

Connect MySQL database from MySQL Workbench

To directly connect the MySQL server from MySQL Workbench we have to allow the IP address of the system you will be accessing the MySQL Workbench from. As convenient it sounds, it isn't always feasible to do so since the some of us still have a dynamic IP address. 
In such cases, we have to allow everyone to access the MySQL database with '%' which can be a significant security risk.

However, we have an alternative solution on MySQL Workbench to connect without binding IP in Mysql Server. We can do it by over the SSH method (first SSH to the server using SSH user then log in to the MySQL user locally )

 Open MySQL workbench -> Database -> Connect Database 



Select connection method: "Standard TCP/IP over SSH"



Enter the IP:port_no in SSH Hostname, Username & password in SSH username & SSH password
For Mysql keep MySQL Hostname & port same as 127.0.0.1 and 3306 as we are connecting locally, username and password of DB you want to connect.