People use SSH today mostly to encrypt connections. You'll have to use a "tunnel" that you use to deliver data from one host to the other one. This is pretty easy to setup, but I've used it for FTP only in the past so I don't know if there maybe are some issues with DBI/MySQL...