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.
- I took dump of master data with mysqldump --single-transaction --master-data=2 --all-databases --routines --triggers --events > dump.sql
- Imported the dump file in slave
- Reset slave all; on slave machine I did
- Got the new master file and position from dump file using
head -28 dump.sql
- 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;
- 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.
Can you please help me to resolve this.