
Managing a remote MySql instance with an SSH Tunnel
I thought this may be of use to anyone trying to do this. Start of by opening up an SSH client / terminal.
ssh -L 3310:127.0.0.1:3306 user@remote_server.com
Enter a password when prompted.
Once logged in, **keep **the connection open.
Connect your MySQL workbench, command line client, or equivalence to port3310. This is the port you are listening on “locally”:
mysql –host=127.0.0.1 –user=username –port=3310 -p
Once you have established a connection, any commands you run on your local client - will “impact” the remote database.