First of all MySQL replication do not mismatch position in simply
starting and stopping the slave as long as you have all relay and info
files.

Secondly, change master recreates the master.info file. 

Third...one can implement the log_position table on slave inserting a
record every minute to record the details from "show master logs and
show slave status" commands. This will give you exact position every
minute in your database and one can run change master anytime to play
with the position.

I have never seen MySQL replication changing position in just starting
and stopping slave. Which MySQL version or release on what O/S?



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 20, 2004 9:26 AM
To: [EMAIL PROTECTED]
Subject: RE: Problems with replication restarting

So this would imply that you cannot simply stop/start a slave server -
instead, I would need to write a wrapper script that stops the slave
using "STOP SLAVE", and at next startup, read the master.info file to
find out where it left off, and then issue a "CHANGE MASTER TO..."
statement to continue on ?

That can certainly be done, but it seems strange that there's no mention
of such a big "gotcha" in the MySQL manual...

Many thanks for the advice,

-Mark

-----Original Message-----
From: Ian Sales [mailto:[EMAIL PROTECTED] 
Sent: 20 December 2004 16:42
To: Round, Mark - CALM Technical <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]
Subject: Re: Problems with replication restarting


[EMAIL PROTECTED] wrote:

>However, when I restart the slave (through init scripts, or when
>rebooting the server etc.), instead of continuing on from where it left
>off, it appears to start again from the beginning. This is confirmed by
>watching the value of Relay_Log_Pos from SHOW SLAVE STATUS\G.
>  
>
- delete the master.info file in the data directory, and then use CHANGE

MASTER ... to set the required values before starting replication on the

slave.

- ian


-- 
+-------------------------------------------------------------------+
| Ian Sales                                  Database Administrator |
|                                                                   |
| eBuyer                                      http://www.ebuyer.com |
+-------------------------------------------------------------------+
-----------------------------------------------------------------------
This E-mail is from IPC Media Ltd whose registered office is at Kings
Reach Tower, Stamford Street, London SE1 9LS, registered number 53626.
The contents and any attachments to it include information that is 
private and confidential and should only be read by those persons to 
whom they are addressed. IPC Media accepts no liability for any loss or
damage suffered by any person arising from the use of this e-mail. 
Neither IPC Media nor the sender accepts any responsibility for viruses
and it is your responsibility to check the email and attachments (if
any).
No contracts may be concluded on behalf of IPC Media by means of e-mail
communications. If you have received this e-mail in error, please
destroy
and delete the message from your computer. For unbeatable savings on
magazine subscriptions and great gift ideas visit www.ipcsubs.co.uk/IZAF


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to