From: Ananda Kumar Date: August 26 2010 1:09pm Subject: Re: master-slave replication sync problems. List-Archive: http://lists.mysql.com/mysql/222688 Message-Id: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=0016e64c276429afad048eb9b64a --0016e64c276429afad048eb9b64a Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable since u r starting slave by postion beyond master, and if some of the changes are already present on slave, it would error out with duplicate. You need show slave status\G; slave stop; show slave status\G;..wait for few min..than again show slave status\G;....just to make sure...slave is in complete sync with master... Here u will see the master log file and position. U need to use this, next time u start ur slave to sync with master. regards anandkl On Thu, Aug 26, 2010 at 6:34 PM, Norman Khine wrote: > hello, > i have a working master-slave replication, the problem i find is that > if i restart the MASTER there is a difference in the MASTER_LOG_FILE > and MASTER_LOG_POS on the SLAVE. > > what is the correct way to keep the two slaves in sync even after i > restart the server. the way i do it now is to: > > [MASTER] > mysql> show master status; > > > +------------------+----------+----------------------+-------------------= -------+ > | mysql-bin.000010 | 13405429 | upgrade,tracker,bugs | > mysql,information_schema | > > +------------------+----------+----------------------+-------------------= -------+ > 1 row in set (0.00 sec) > > [SLAVE] > mysql> stop slave; > mysql> change master to MASTER_HOST=3D'master.domain.com', > MASTER_USER=3D'replicator', MASTER_PASSWORD=3D'xxx', > MASTER_LOG_FILE=3D'mysql-bin.000010', MASTER_LOG_POS=3D13301215; > mysql> start slave; > > is this correct or is there a better way to do this? > > thanks > > -- > =CB=99u=CA=8Dop =C7=9Dp=C4=B1sdn p,u=C9=B9n=CA=87 p=D7=9F=C9=B9o=CA=8D = =C7=9D=C9=A5=CA=87 =C7=9D=C7=9Ds no=CA=8E '=CA=87u=C7=9D=C9=AF=C9=90=D7=9F = s=C7=9D=C9=AF=C4=B1=CA=87 =C7=9D=C9=A5=CA=87 pu=C9=90 '=CA=87u=C7=9D=CA=87u= o=C9=94 > =C7=9Dq s,=CA=87=C7=9D=D7=9F =CA=87=C7=9D=CA=8E > %>>> "".join( [ {'*':'@','^':'.'}.get(c,None) or > chr(97+(ord(c)-83)%26) for c in ",adym,*)&uzq^zqf" ] ) > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/mysql?unsub=3Danandkl@stripped > > --0016e64c276429afad048eb9b64a--