mySQL Replication Cheat sheet
15 Sep 2010 by Misha Dragojevic
This document is just a quick cheat sheet for DB admin on how to setup mySQL replication.
Detailed instructions can be found on mySQL site and should be followed to the letter.
Step 1: Configure mySQL for replication
Edit mySQL configuration file, usually /etc/mysql/my.cnf. You need to configure both master and slave.
NOTE: server-id above needs to be unique, i.e. you can set master mySQL server with server-id=1 and slave server with server-id=2 *Step 2*: Configure MasterExample of “SHOW MASTER STATUS” command
Step 3: Dump database content, copy to slave
Step 5: Configure slave
Make sure that “Seconds_Behind_Master” value is 0 (zero).
You are done, slave is replicating.