'Mysql8 replication from Digital Ocean to local with GTID_MODE
I'm really struggling to get this to work, I have a managed DO mysql8 DB which runs peachy. I want a local slave replica in my office for peace of mind.
I have dumped the DB, imported it and enabled GTID_MODE - DO has this enabled by default. This all works fine I do the usual:
slave stop; -- on slave then:
CHANGE MASTER TO MASTER_HOST='myDOinstance', MASTER_USER='---', MASTER_PASSWORD='---', MASTER_AUTO_POSITION=0 ,MASTER_LOG_FILE='binlog.00xxx', MASTER_LOG_POS=xxx, MASTER_PORT = xxx;
slave start;
show slave status;
I cannot get the slave to replicate, it connects but there always seems to be a transaction or log file mismatch.
I cannot take down the master DB as it is live, but surely there must be a way to achieve this more easily with a live DB server (I dont believe its possible to disable GTID_MODE on the DO managed DB) It seems with GTID_MODE enabled it is almost imposibble to replicate without running the master in Read Only mode - and I don't really think I can do that without taking down the website its connected to.
EDIT: Digital Ocean say that this is not currently possible. Although I have had it working for a short spell, my local (VM)machine ran out of disc space and on rebuild I could not get it to sync (all the same process used)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
