MySQL over a SSH tunnel

Like this;

ssh {user}@{host} -L {localPort}:portia.teratan.net:{remotePort} -p {sshPort} -fN

The MySQL port (ie: remotePort) by default is 3306.

Connect to mysql like this (localhost won't work, specify the host IP):

mysql -u root -h 127.0.0.1 -p -P {localPort}