Stunnel is a program that allows you to encrypt arbitrary TCP connections inside SSL. Stunnel can also allow you to secure non-SSL aware daemons and protocols (like POP, IMAP, LDAP, etc) by having Stunnel provide the encryption, requiring no changes to the daemon's code. Stunnel uses a client/server model. This means you must install Stunnel on both servers.
I've personally used it to establish secure remote MySQL server connections for daemons which did not have proper MySQL/SSL support.
- Linux Gazette - Secure Communication with Stunnel
- Has a good section on securing MySQL connections
- How To Set Up an SSL Tunnel Using Stunnel on Ubuntu
- Using Stunnel to Secure MySQL Database