I have a dev server rack in my home, and being the geek that I am I have PC’s everywhere throughout my house all networked according to their jobs. My command centre (Office and Gaming centre) is where I do most of my work, but my files and sites are stored on a dev share in my racks.
MySQL by default does not allow remote access and rather than change what I think is a pretty good security feature I had to Forward Ports to do so.
By creating an ssh tunnel to the dev server MySQL is tricked into thinking my requests are local.
So how do I connect to MySQL via MySQL Administrator on a Local Network? Like this:
Linux: In Terminal create an SSH tunnel forwarding any unused ports you have on your machine. Lets use 11000 for this example, forwarding to the default MySQL port on the host machine (usually 3306), and we’ll use 10.1.1.500 for our local mysql server. The Syntax is:
ssh -L localport:localhost:remoteport user@server.mysql.is.on
Our example becomes:
ssh -L 11000:localhost:3306 user@10.1.1.500
Now in MySQL Administrator login to 127.0.0.1 on port 11000 enter your username and password and BOOM! you’re in.
Leave a Reply