We help IT Professionals succeed at work.
Get Started

MySql replication throwing an error

Last Modified: 2012-05-09
I am using MySQL db to for my Live DB and replicated db.

I use dbA as the Master
and dbB as the Slave

yesterday , stupidly i inserted something into dbB before inserting into dbA, and now i am getting an error saying ''Duplicate entry....'''

This has seemed to stop replication now on dbB
I have chacked the Slave_IO_RUNNING and its still YES

And it doesn't tell me how many seconds i'm behind the master at all now.

So i'm wodering what i can do to get this back working again.

I checked the ini file, and i have uncommented the sql that says
# Next row skips duplicate key errors- only use if starting replication and dbs are from different log positions

So i was hoping that it would skip over the dup error message.
I saved the ini file and then waited for mysql to catch up.
I'm not familar with this section of the db to be honest and as nothing has yet happened, i'm wondering,

Do i have to to STOP SLAVE and then
START SLAVE so that it will re read the ini file and take in to account now to ignore the duplication error.

Or if this doesn't work at all.
and take note of the MASTERS position and then
REstart the SALVE but at the location of the master?

I know i might miss some information, but it will eventually catch up won''t it?

Hopefully someone can help me?

Watch Question
Database Consultant
This problem has been solved!
Unlock 1 Answer and 3 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE