u/GieltjE

Has anyone been able to get replication working with the new log_bin option?

It's described as the easiest automagic thing ever but in practice for us it's just been plain impossible no matter what we try. (without the new log_bin we've been running and restoring backups for over a decade).

mariadb-backup --defaults-file=/etc/mysql/debian.cnf --backup --target-dir=/mnt/replication/
mariadb-backup --defaults-file=/etc/mysql/debian.cnf --prepare --target-dir=/mnt/replication/

Copy to different server, start it:

CHANGE MASTER TO MASTER_HOST='.....', MASTER_USE_GTID=slave_pos, MASTER_USER='.....', MASTER_PASSWORD='......', MASTER_PORT=3306, MASTER_DEMOTE_TO_SLAVE=1;
START SLAVE;

When using gtid_strict_mode:

An attempt was made to binlog GTID 0-13373-21105294 which would create an out-of-order sequence number with existing GTID 0-13373-21857761, and gtid strict mode is enabled

When not using gtid_strict_mode:

It just starts replicating at the oldest point in the masters binary log, which just fails, forcing it to use the supplied point (e.g. SET GLOBAL gtid_slave_pos = "0-13373-21857761") needs to be repeated multiple times before it gets accepted, then it runs for a second and starts complaining that the GTID-sometime after the enforced one does not exist on the master (HA_ERR_KEY_NOT_FOUND).

reddit.com
u/GieltjE — 7 days ago