MySQL Multi Source Replication With GTID and Non-GTID Mode
During our recent migration we migrated a part of a app to different region with new db. Our previous setup was on MySQL 5.6.39 with single write master and multiple slave to read data.
But now Masters will be two one for old and second for new migrated service. We moved new master on MySQL 5.7 with GTID, MTS and Logical Clock based replication. So our use case was to read whole data (written on master1 + master2) from slaves.
So now question is What we have done to achieve this?
Below is New Setup:
Now Question is what slave 5 is doing and how we can generate GTID on an intermediate slave?
Ans: With the help of our community expert (Jean-François Gagné) we got to know that we can generate GTID on an intermediate slave using process described in blog: https://goo.gl/aKBxLU
So we compiled MySQL from patched source code and rolled out GTID on it. It worked and started generating GTID's. Now we upgraded our existing slaves from MySQL 5.6 to 5.7 and configured new slave channel of Master 2 on it.
Conclusion: So in way we have configured Multisource replication where we are getting data from Non GTID master and GTID master both.