in reply to ssh tunneling

You (probably) just need to rebuild your DBD::Mysql with the --ssl flag. Then you can pass the mysql_ssl=1 param with the DBI connect. You may also need to set mysql_ssl_client_key mysql_ssl_client_cert mysql_ssl_ca_file mysql_ssl_ca_path and mysql_ssl_cipher. See the DBD::Mysql docs for details.

stunnel is a general purpose widget to be aware of for securing connections, although you should not need it in this case.

cheers

tachyon