Hi there,

we have two databases replicating perfectly now, though we have a big
doubt now: How should we rotate the binary logs without a problem?

I was checking out the PURGE MASTER LOGS command in the Manual. The text
below was taken from there:


"Available starting in Version 3.23.28. Deletes all the replication logs
that are listed in the log index as being prior to the specified log,
and removed them from the log index, so that the given log now becomes
first.

Example: 
PURGE MASTER LOGS TO 'mysql-bin.010'

This command will do nothing and fail with an error if you have an
active slave that is currently reading one ofthe logs you are trying to
delete. However, if you have a dormant slave, and happen to purge one of
the logs it wants to read, the slave will be unable to replicate once it
comes up. The command is safe to run while slavesare replicating - you
do not need to stop them. You must first check all the slaves with SHOW
SLAVE STATUS to see which log they are on, then do a listing of the logs
on the master with SHOW MASTER LOGS, find the earliest log among all the
slaves (if all the slaves are up to date, this will be the last log on
the list), backup all the logs you are about to delete (optional) and
purge up to the target log." 

So that, from what I've understood, when I do a PURGE MASTER LOGS TO
'mysql-bin.010', it will delete all the prior logs and start a new log
called mysql-bin.010 as being the one to index.

And then? What should I do? Should I run CHANGE MASTER TO in the SLAVE,
so that it would now read from mysql-bin.010?

The current bin log is getting too large and I'm not really sure about
what should I do specifically. I've read somewhere in the manual that
what could be done is: one locks all the tables and do a reset master
and a reset slave. I don't think that would do it either.

Has anyone come up with another idea to fix this problem?

-- 
Leonardo Dias
Catho Online
WebDeveloper
http://www.catho.com.br/

---------------------------------------------------------------------
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