Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I had a auto-increment duplication issue for master-master replication. Then, I set:

SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 99999;

This skips 9999 queries. Then I did:

SHOW SLAVE STATUS\G
Slave_IO_Running: Yes
Slave_SQL_Running: Yes

And it seems to be running OK.

But, of course, since I skipped 99999 statements...if I make a change on Database 1, it will not reflect it on Database 2...until 99999 statements are passed. Correct?

Well...I created a script to automatically insert 999999 rows into a dummy table. This should be more than enough , right? And my 2 databases should be in sync again???

But, I am on my 3 millionth row, and it doesn't seem to be working. My Database 2 still does not have these 3 million rows that I just created on Database 1.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

I would strongly recommend reading http://www.neocodesoftware.com/replication/ as it sounds like your master-master rig isn't setup correctly (and now you've got a split brain situation).

All you've done by setting sql_slave_skip_counter is skip over the records that are causing you problems (hence the reason that you've got inconsistent data).

share|improve this answer
1  
Just as a side note. I've never seen a MySQL master/master rig end in anything but tears. It's just not mature enough and there's too many things you can do in your database schema design to break it horribly. If you can avoid using it, you should. –  rodjek Dec 8 '09 at 22:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.