Network Computing is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

How To Set Up SSH Encrypted MySQL Replication: Page 2 of 3

log-bin=mysql-bin
server-id=1

Next, create the replication account.  In MySQL, run the following queries:

CREATE USER 'replicationuser'@'master_ip' IDENTIFIED BY 'replicationpassword';
GRANT REPLICATION SLAVE ON *.* TO 'replicationuser'@'master_ip';

On the slave, add to the my.cnf file:

server-id = 2
master-host = 127.0.0.1
master-user = replicationuser
master-password = replicationpassword
master-port = 7777