Description:
Isn't possible restore replication with master-master under following condition
both mysqld version 5.1.50
and
log-bin=mysql-bin
binlog_format=ROW
After error at server-1 I run SLAVE STOP at server-1
and then at server-2 create consistent snapshot
mysqldump -B --master-data db4 db5 >/tmp/dump.sql
server-2 is master for databases db4 and db5, server-1 is master for another databases (by the application logic).
back to server-1, check md5sum of the dump.sql and run
mysql -B < dumpa.sql
SLAVE START
101001 23:44:38 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.000171' at position 3296358, relay log './s3-relay-bin.000002' position: 3296503
101001 23:44:38 [ERROR] Slave SQL: Could not execute Write_rows event on table ...; Duplicate entry '2095-83-2' for key 'ident', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log mysql-bin.000171, end_log_pos 3325631, Error_code: 1062
101001 23:44:38 [Warning] Slave: Duplicate entry '2095-83-2' for key 'ident' Error_code: 1062
101001 23:44:38 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.000171' position 3325443
101001 23:44:38 [Note] Slave I/O thread: connected to master '...',replication started in log 'mysql-bin.000171' at position 14730095
Some my checkpoints
- dump contain: CHANGE MASTER TO MASTER_LOG_FILE='...', MASTER_LOG_POS=...;
- server-2 restarted before mysqldump
- all APPs stoped during mysqldump at server-2
Repeated...
How to repeat:
see Description