MySQL RDS Error 1062

amazon-rdsduplicationMySQLreplication

Normally we can skip 1062 duplicate error but in rds can we skip multiple 1062 errors in one go.

For example we define slave skip error =1062 in my.cnf and restart slave. but in RDS MYSQL how can we permanently skip 1062 error, alteast for few hours as we have duplicate data in the restore file and unfortunately log position we have is old.

Best Answer

If you cannot use the RDS CLI, set proper DB Parameters or other means to set slave-skip-errors=1062, you are better off just creating a read replica to make a new Slave from the Master then dropping the old Slave that had the 1062 error.

I have mentioned MySQL RDS Read Replicas in the past

After creating read replica, you should make sure you are using INSERT IGNORE or INSERT ... ON DUPLICATE KEY commands on the Master to prevent duplicate keys from replicating to Slaves.