Question regarding Multi-source MariaDB replication
Hey,
I've been following this guide: http://www.severalnines.com/blog/multi-source-replication-mariadb-galera-cluster
So far i've got everything working but I need clarification on a matter. From what I've understood, I'll need to re-enter the the latest GTID's for all the database that I've added to the slave every time I need to add a new database into the mix? Is this the case or have I misunderstood something?
-
Hi,
Following example shows on how to add new database/master connection to existing multi-source replication:
1. To change the GTID positioning, you have to stop all slaves:
MariaDB> STOP ALL SLAVES;
2. Retrieve the latest Gtid_Slave_Pos. This value will remain the same on all slaves' channel:
MariaDB> SHOW ALL SLAVES STATUS\G
..
Gtid_Slave_Pos="1-101-190569,2-102-156664";
..3. Set the new global_slave_pos by appending the gtid_slave_pos for domain ID 3 (the new database on new master):
MariaDB> SET GLOBAL gtid_slave_pos="1-101-190569,2-102-156664,3-103-15074";
4. Configure a new master connection for domain ID 3:
MariaDB> SET @@default_master_connection='mariadb3';
MariaDB> CHANGE MASTER 'mariadb3' TO MASTER_HOST='10.0.0.103', MASTER_PORT=3306, MASTER_USER='<slave user>', MASTER_PASSWORD='<slave password>', MASTER_USE_GTID=slave_pos;5. Start all slaves:
MariaDB> START ALL SLAVES;
That's all.
Regards,
Ashraf
Please sign in to leave a comment.
Comments
1 comment