Connecting to a local database on a remote machine
1 2 ssh -N -L <port_number>:127.0.0.1:3306 remote_machine
so you can now open CocoaMysql and connect to localhost, bla, bla but if you use the <port_number> assigned above you should see your remote database.