To forward a port with ssh:#

ssh -2 -f -C -N -L localport:localhost:remoteport

In this example then, you can use 3307:localhost:3306 to use your local MySQL admin to manage a remote database. In MySQL Admin, collect to port 3307 on, NOT localhost!

Connect to MySQL over forwarded port:#

mysql --user=db_role --password=db_user_password --host= --port=3307
ssh -f -L sleep 10
irc -c '#users' -p 1234 pinky

Linux.Shell - SQL - Networking