Problem
A problem we occasionally see is Relay Log corruption, which is
most frequently caused by network errors. At this point in time,
the replication IO thread does not perform checksumming on
incoming data (currently scheduled for MySQL 6.x). In the mean time, we have a relatively
easy workaround: encrypt the replication connection. Because of
the nature of encrypted connections, they have to checksum each
packet.
Solution 1: Replication over SSH Tunnel
This is the easiest to setup. You simply need to do the following
on the Slave:
shell> ssh -f user@master.server -L 4306:master.server:3306 -N
This sets up the tunnel. slave.server:4306 is now a tunnelled
link to master.server:3306. So now, you just need to alter the
Slave to go through the tunnel:
mysql> STOP SLAVE;
mysql> CHANGE MASTER TO …
[Read more]