in reply to ssh tunneling

First of all, there appears (according to the documentation for DBD::mysql/DBI) to be parameters for making the connection over SSL.

Secondly, if that is not an option, you may wish to look at Net::SSLeay for setting up secure sockets layer (SSL) connections. That, possibly in connection with the stunnel application, might be another option to look into.

Hope that helps.