'MySQL enable GTID on Replica MySQL instance
We are currently using binary replication from our master to slave.
Is it possible to enable the GTID on the slave only? (this is required from some other application reading from the replicas, but we don't want to make changes to master)
Are there any reasons why this should not be possible?
Solution 1:[1]
See https://dev.mysql.com/doc/refman/8.0/en/replication-mode-change-online-enable-gtids.html:
From MySQL 8.0.23, you can set up replication channels to assign a GTID to replicated transactions that do not already have one. This feature enables replication from a source server that does not use GTID-based replication, to a replica that does.
Read the rest of the documentation I linked to for more details. I understand this paragraph to mean you cannot do what you describe on a version older than 8.0.23. If you want to do this, you must upgrade at least the replica to 8.0.23.
However, I'd recommend that you enable GTID on your source instance, not just the replica. You can do this on older MySQL versions, and there are other advantages to using GTID throughout your replica-set. I don't know why you don't want to do this, but I'm not able to think of a good reason.
In case of MySQL 5.7, it is not possible to enable the GTID in replica only. Follow this guide to enable the GTID: https://dev.mysql.com/doc/refman/5.7/en/replication-mode-change-online-enable-gtids.html
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | M4rk |