I set up two MySQL servers to run in a failover configuration.  Because
queries will only ever be submitted to one server at a time, I decided to
use a makeshift two-way replication scheme under MySQL as descibed in
the MySQL manual.

First server (wallace) has this:
--------------------------------
server-id=1
log-bin
master-host=gromit
master-user=repl
master-password=<password>
log-slave-updates
--------------------------------

Second server (gromit) has this:
--------------------------------
server-id=2
log-bin
master-host=wallace
master-user=repl
master-password=ghoti
log-slave-updates
--------------------------------

I started by mirroring both data directories.  Then I started both servers
and all looked fine.  Logs indicate no errors.  When I inserted some
data on wallace, gromit replicated them just fine.  But when I tried to
insert data on gromit, wallace never got the changes.  The weird thing is,
no real errors appeared in the logs.

Then I did a "SHOW SLAVE STATUS" on wallace and saw "Skip_counter" was
set to 4294967295!!!  Strange, I thought, so I ran "STOP SLAVE", "SET
SQL_SLAVE_SKIP_COUNTER=0", and "START SLAVE" on wallace.  Suddenly
changes made on gromit were reflected on wallace.

But then I tried to insert data on wallace again and the same thing
happened.  This time gromit never got the changes.  When I ran "SHOW SLAVE
STATUS" on gromit, it indicated 4294967293.  To get it to work, I had to
run "SET SQL_SLAVE_SKIP_COUNTER=0" on gromit.

I just don't get it...  Why are the skip counters being reset to thse
crazy high numbers?  Shouldn't both servers just replicate each other?  Is
this a replication bug?  Please help!

Matt Hahnfeld
EverySoft


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to