database

MySQL Database Replication over an SSH Tunnel

February 13, 2011

SSH Tunnel Setup Create an SSH key (Version 2) to allow passwordless replication: $ ssh-keygen -t rsa Copy the SSH key to the Master (assumes same user account on Master and Slave): $ ssh-copy-id master.machine.dom Setup the SSH Tunnel from the Slave to the Master on Slave Port 3305: $ ssh -f master.machine.dom -L 3305:127.0.0.1:3306 [...]

Read the full article →