As long as you have SSH access, you can still access ports on a remote server which are blocked via a firewall.  You simply need to use a function of the SSH protocol called Port Forwarding (or Tunneling).   This process allows you to open a port on your local machine, which is forwarded via SSH to the required port on the remote machine:

localhost:8000 == forwarded to ==> remote:3306

The above example would allow you to connect to localhost on port 8000 which would then be tunneled to the remote host on port 3306 (mysql).  

But how to set this up?  There is a set of commands which you can enter on a terminal, which will create the tunnel for you:

ssh -L 8000:localhost:3306 username@remoteserver

However I prefer to use iSSH which is a great little Mac utility that creates the tunnel for you.  Simply enter the remote address, port and click ‘Connect’ and your tunnel is setup: