MySQL Admin via SSH Tunnel

Lets create a ssh tunnel into our remote server so that we can connect MySQL Administrator.  This will trick MySQL Administrator into thinking that it has a local connection to the remote machine when it doesn’t.  This is great for getting around having only local MySQL access rights while trying to login from a remote machine.

ssh -N [email protected] -L 3305:localhost:3306

Now boot up MySQL Administrator and connect to localhost or 127.0.0.1 port 3305.  Bam, your into your remote mysql server.

You may notice some werid things like “Server not running”, ignore it.  Basically it means that it has connected to the MySQL server but can’t find the program running locally.  Also the MySQL Administrator interface will hang a bit when fetching data.  Silly one threaded programmers.  Always disconnect your UI from the data via threads!

Posted on March 18, 2010 at 8:30 pm by Jordan Carter · Permalink
In: Server Config, Ubuntu Tricks, Web Development · Tagged with: ,

Leave a Reply