I have a MySQL database that I'm going to start replicating, and I plan on using GTIDs to do so. The slave will be a brand new virtualized server located overseas.
My question is 2-fold:
- When I enable GTIDs on the existing master, will GTIDs be created for all previous transactions? Or will they only be created for transactions posted after enabling GTIDs?
- If yes, can I simply let the slave replay all of the GTIDs at its own pace?(meaning I don't have to sync the slave before enabling replication)
- I don't care how long it takes the slave to sync (within reason, of course. 2 weeks is probably the max).
I'll be testing this out on some dummy dev servers come Monday or Tuesday, but I figured I'd ask here first.
Version and DB Info:
- Master: MySQL 5.6.19 on Windows Server 2008R2 (EoL, I know...), but will be upgraded to 5.6.37 before starting replication and will then be upgraded to 5.7.x sometime thereafter.
log_binfor this server is currently OFF.
- Slave: MySQL 5.7.19 on Ubuntu Server 16.04 LTS (verified compatible)
- Size: It's probably considered a small database, totalling only about 330GB and something like 2.5 billion rows.
So far, I've gone through and enabled both binary-log based replication GTID-based replication on various dev servers, but they 1) are very small/empty; 2) had
log_bin enabled from the start; or 3) were synced before replication was enabled.