MySQL replication revisited
Today we added another MySQL replication slave to the Tradebit cluster to cope with the ongoing growth of the platform. We also added 3 Terabytes of storage for your extreme pleasure.
While we wanted to run the platform without interruption, we learned more about the replication process:
If you have a master MySQL server, which replicates to a slave and you want to add an additional slave, you would do a “show master status” on the master server and note down the values you see. Then do a mysqldump of the master database and copy that to the slave you want to start. Load it there.
Once the load process is finished, you would use the CHANGE MASTER command like that:
mysql> CHANGE MASTER TO MASTER_HOST='',
MASTER_USER='',
MASTER_PASSWORD='',
MASTER_LOG_FILE='',
MASTER_LOG_POS=;
Add a “stop slave” and “start slave” around that and you are fine. The replication process starts at that point where you have dumped the database and catches up automatically!


