Thomas Plant <thomas@plant.systems> writes:
Today I had time to look at the error, removed the duplicate ID from the table and started the slave thread again using 'start slave;'.
But now I get another error:
Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Error: connecting slave requested to start from GTID 0-2-2948175468, which is not in the master's binlog. Since the master's binlog contains GTIDs with higher sequence numbers, it probably means that the slave has diverged due to executing extra erroneous transactions'
So it seems you are using MariaDB Global Transaction ID with MASTER_USE_GTID=current_pos, and you forgot to do the duplicate ID removal under `SET sql_log_bin=0`. The easiest solution is probably to CHANGE MASTER TO MASTER_USE_GTID=slave_pos. This should make the slave ignore the local transaction and just connect to the master using the last replicated position. (current_pos tells the MariaDB server that you expect any local transactions on the slave to also be replicated to other servers, hence the error. current_pos is appropriate for an earlier master that is turned into a slave, but not for a slave where local "fixup" transactions ended up in the binlog). Hope this helps, - Kristian.