MariaDB GTID replication Fix
Hi All,
I have a MariaDB GTID based replication and my setup is like Master-Master. Server A -Server B (Master-Master) Note :- Each acting as slave for each other. Server B -- Acting Slave for Server A Server A - Acting Slave for Server B
Application is pointed to both server A and Server B.
current Issue :- Replication is broken on Server B and Now I need to rebuild the replica Server B suing backup from Server A . But the Question is once the replication is rebuild on server B and i have configured the replica .I need to re configure the slave on Server A .So that time what would be change master command .
Will it be Master_use_gtid=slave_pos or current_pos
Can someone help.
Answer
The recommended method is to use CHANGE MASTER TO Master_use_gtid=slave_pos
If you completely rebuilt the Server B then it starts without binlogs, and you may need to reset the Server A replication position. Depending on how you rebuilt the Server B, you may need to SET GLOBAL gtid_slave_pos='xxx' on Server A, or you may be able to use the Master_demote_to_slave=1 option of CHANGE MASTER.