I'm trying to get to a mysql server on a remote network, and to get to it I currently have to do several ssh hops, so I can use the mysql command line interface. I'd really like to do a mulit-hop tunnel so I can just use a gui from my desktop. How would this work?
Here's the order:
MacDesktop –> DevServer –>StageServer –> Mysql01
All (except the mac desktop)are linux boxes, and mysql is running on the standard port.
Any Hints? Or an exact connection string?
Best Answer
You can use ssh to forward the ports(assuming that the mysql server is configured to accept connections from StageServer on port 3306):
Now configure the gui client to connect to 127.0.0.1:3306 (Make sure you're not running mysql on your Mac or forwarding to port 3306 will fail, or use another port for forwarding)
Edit: Make sure that local port forwarding is enabled in ssh server configuration.