Mysql 5.7 replication failure

Hi everyone,

I got an issue in mysql 5.7 master slave replication error.

Can you please help in resolving this.

Steps I followed o resetup of slave with master data.

  1. I took dump of master data with mysqldump --single-transaction --master-data=2 --all-databases --routines --triggers --events > dump.sql
  2. Imported the dump file in slave
  3. Reset slave all; on slave machine I did
  4. Got the new master file and position from dump file using
    head -28 dump.sql
  5. Change master to master_host=xxx, master_port=xxx,master_user=xxx,master_password=xxx, master_delay=86400, master_log_file=xxx, master_log_position=xxx;
  6. Start slave ; on slave machine

But the replication is failed with 1062 duplicate error.
I Cross checked the master log file and position from dump file, I verified the error logs.

Nothing helped.

Can you please help me to resolve this.


Have you tried this without the master_delay option?

1 Like

Hi mattheab,

No I didn’t tried without master_delay, can you please help me how it different.


1 Like

Run the same change master command as you have, but remove the master_delay parameter. Simple. Also, please confirm that all of your tables are InnoDB engine?

1 Like