Monday 6 February 2012

Connect to MySql via SSH tunnel

You have your Mysql database up and running in production. You are happy connecting to server by ssh and doing everything using console. Felt like you miss something here. Yes you miss a good mysql client here. As security is of prime importance you cant enable your mysql to accept connections from outside localhost.

So how to do this in a secure manner?  SSH tunneling is the answer. After following these instructions, you'll be able to connect to localhost on your workstation using your favorite MySQL management tool. The connection will be securely forwarded to your Cloud / server space over the Internet.