We currently have 3 MySQL Servers running;
-
the first which contains production data and is due to be retired
mysqld Ver 5.5.28-0ubuntu0.12.04.2 for debian-linux-gnu on x86_64 ((Ubuntu))
mysql> SHOW MASTER STATUS;
Empty set (0.00 sec) -
the second which contains out of date snapshot of production data and is to take over from the first.
mysqld Ver 5.5.28-0ubuntu0.12.04.3-log for debian-linux-gnu on x86_64 ((Ubuntu))
-
the third which is already a slave of the second server.
mysqld Ver 5.5.29-0ubuntu0.12.04.1 for debian-linux-gnu on x86_64 ((Ubuntu))
mysql> SHOW MASTER STATUS;
Empty set (0.01 sec)
My question is would I go about setting up the following?:
First Server (master) -> Second Server (slave) -> Third Server (slave)
Tutorial links welcome! I tried to Google, but I'm sure I've gotten the wrong keywords
Best Answer
Based on our chat conversation, here is what was discussed
This implies that binary logging is enabled in Server2.
To Make Server1 a Master of Server2, perform the following:
STEP 01 : On Server2, add this to
/etc/my.cnf
STEP 02 : On Server3, run
STOP SLAVE;
STEP 03 : On Server2, run
service mysql restart
STEP 04 : On Server3, run
START SLAVE;
STEP 06 : On Server1, add this to
/etc/my.cnf
STEP 07 : On Server1, run
service mysql restart
STEP 08 : Set Replication From Server1 to Server2
See Clarification about master slave configuration in mysql
OPTIONAL
Once you have MySQL Replication Going From Server1 to Server2 to Server3, your can properly load all data into all three MySQL Instances by doing the following on Server1:
This will do three(3) things
Since your data is 50MB in total, this should be execute very quickly.