How to re-sync the Mysql replication if Master down
0
votes
1
answer
894
views
I have a very simple webapp infra: FE => BE => MySQL. I have set up MySQL master-slave replication successfully. If my MySQL master node is down, I can manually point the MySQL IP to the Slave node in my BE. Users can insert data into the table with no problem. But I cannot re-sync the data backup to the master node after I bring the master node up. So far I tried 2 methods but both of them don't work:
1. Restart the Master node and reset the Slave node.
2. Switch over the role of them, change original Slave to Master, original Master to Slave.
If the Master is down, how do I re-sync the data back to Master from Salve after Master is back to normal? In my case, do I have to copy the data from Slave to Master by mysqldump before re-sync?
I am very new to MySQL, any help is appreciated!
Asked by ITnewbie
(109 rep)
Apr 12, 2022, 06:39 AM
Last activity: Jul 19, 2025, 03:03 PM
Last activity: Jul 19, 2025, 03:03 PM