List:Replication« Previous MessageNext Message »
From:Artem Koltsov Date:January 19 2005 8:00pm
Subject:RE: problem after switching master / slave roles twice
View as plain text  
I am not sure what could cause it because I don't know how master_log_pos and
master_log_file will behave if they are not set explicitly in step 1. It is possible that
slave in step 3 requests binlog from master from the same position as at the beginning of
the step 1. I would try setting master_log_file and master_log_pos on db1 in step 1. You
will need to run SHOW MASTER STATUS\G on db0 to get this values.

> -----Original Message-----
> From: olivier kaloudoff [mailto:olivier.kaloudoff@stripped]
> Sent: Wednesday, January 19, 2005 2:13 PM
> To: Artem Koltsov
> Cc: replication@stripped
> Subject: Re: problem after switching master / slave roles twice
> 
> 
> On Wed, 19 Jan 2005 09:18:50 -0800, Artem Koltsov
> <Artem.Koltsov@stripped> wrote:
> > Hi,
> > 
> > Did you change master_log_pos and master_log_file values on 
> db1 before step 3?
> 
> Hi Artem,
> 
>    no, I did not change these numbers. Additionnaly, In the 
> CHANGE MASTER
> instruction, I'm only using the HOST, USER and PASSWORD variables.
> 
> 
> Olivier
> 
> > 
> > 
> > > -----Original Message-----
> > > From: olivier kaloudoff [mailto:olivier.kaloudoff@stripped]
> > > Sent: Wednesday, January 19, 2005 11:41 AM
> > > To: replication@stripped
> > > Subject: problem after switching master / slave roles twice
> > >
> > >
> > > Hello,
> > >
> > >
> > >         I just setup a simple master / slave scheme using 
> 4.1.8, to
> > > achive high availability.
> > >
> > >         Now I have to test if replication is ok when I switch the
> > > roles of my two servers, db0 and db1;
> > >
> > > 1. starting with: db0 master, db1 slave, replication goes fine
> > > 2. switching  to: db0 slave, db1 master, data put on db1
> > > replicates fine
> > >
> > > 3. now, switching back to: db0 master, db1 slave, the 
> replication is
> > > broken, and "show slave status" gives;
> > >
> > > "Error 'Can't create database 'jmax'; database exists' on query.
> > > Default database: 'jmax'. Query: 'create
> > > database `jmax`"
> > >
> > > (the jmax database has been created at step 1, replicated 
> fine, and
> > > now breaks for an unknown reason).
> > >
> > >
> > >         as the replication FAQ says, I used the --log-bin 
> option on
> > > both servers, but no --log-slave-updates option. On both 
> servers, I
> > > can see relay and binary logs beeing written.
> > >
> > >         did I miss something obvious, or is there a bug 
> somewhere ?
> > >
> > >
> > > Best Regards,
> > >
> > >
> > > Olivier Kaloudoff
> > > CKR Solutions Open Source
> > > Mandelieu, France
> > > http://www.ckr-solutions.com
> > > 
> > > --
> > > MySQL Replication Mailing List
> > > For list archives: http://lists.mysql.com/replication
> > > To unsubscribe:
> > http://lists.mysql.com/replication?unsub=1
> > 
> >  
> > Attention:
> > Any views expressed in this message are those of the 
> individual sender, except where the message states otherwise 
> and the sender is authorized to state them to be the views of 
> any such entity. The information contained in this message 
> and or attachments is intended only for the person or entity 
> to which it is addressed and may contain confidential and/or 
> privileged material.  If you received this in error, please 
> contact the sender and delete the material from any system 
> and destroy any copies.
> > 
> > --
> > MySQL Replication Mailing List
> > For list archives: http://lists.mysql.com/replication
> > To unsubscribe:    
> http://lists.mysql.com/replication?unsub=1
> > 
> >
> 
 
Attention:
Any views expressed in this message are those of the individual sender, except where the
message states otherwise and the sender is authorized to state them to be the views of
any such entity. The information contained in this message and or attachments is intended
only for the person or entity to which it is addressed and may contain confidential and/or
privileged material.  If you received this in error, please contact the sender and delete
the material from any system and destroy any copies.
Thread
problem after switching master / slave roles twiceolivier kaloudoff19 Jan
RE: problem after switching master / slave roles twiceArtem Koltsov19 Jan
  • Re: problem after switching master / slave roles twiceolivier kaloudoff19 Jan
RE: problem after switching master / slave roles twiceArtem Koltsov19 Jan