Let’s say you have a shared web hosting account on a random cheap provider, and the only way to access the MySQL server is to either connect from an SSH command line or use phpMyAdmin. While both of these options are okay, in some circumstances it’s not exactly wise to have a phpMyAdmin installation publically accessible, as it lends itself to repeated bruteforce attacks and is subject to server configuration changes. I know on my personal server, there have often been times that I’ve inadvertently left a myAdmin installation wide open for anyone to monkey with the database.
I also enjoy using an application called SQLyog, which is a Windows GUI tool for managing MySQL databases. The Community Edition of the application has proven to be more than sufficient for my random projects, and I highly suggest anyone doing database work on Windows take a look at the application.
Using some details from this article, with an updated version of PuTTY, here’s how I go about configuring my local system to connect to a remote MySQL server:
Start PuTTY:
Define your connection settings and save them:
Navigate to the Connection / SSH / Tunnels view, and provide the following settings:
Source Port: 3306
Destination: localhost:3306
(This assumes you don’t have a MySQL server running on your local machine. If you do, change localhost:3306 to localhost:freeport where freeport is the number of a free port on your workstation.)
Click the Add button, then save your connection settings. In the Forwarded Ports list, you should see L3306 localhost:3306.
Open the connection and sign in to the remote system.
Start SQLyog and define a connection to localhost:3306.
Your connection will be tunnelled through SSH to the remote server transparently. Make sure that you close SQLyog before you close the PuTTY tunnel.
Let me know how this works for your development situations – even if you have direct access to the MySQL server, you should still check out SQLyog for database development if you haven’t already tried it.
Not so far I have found new cool tool to work with mySQL – Valentina Studio. Its free edition can do things more than many commercial tools!!
I very recommend check it. http://www.valentina-db.com/en/valentina-studio-overview