I know this isn't a Perl solution nor does it allow for a change from MySQL to another database, but MySQL does allow for SSL connections. I've never used it, but more info can be found at the MySQL site here.
Thanks very much for your help. I hadn't realised that MySQL could do SSL natively - now I've found the 'mysql_ssl' flags in the DBD::MySQL documentation, which look as though they'll do exactly what I need.
Many thanks, to you and to everyone else who replied. andye.