MySQL Forums
Forum List  »  Replication

Re: PURGE BIN LOGS FILES NOT WORKS
Posted by: Rick James
Date: October 13, 2010 10:51PM

The purge applies to the binlogs. A "master" needs to hang onto the binlogs long enough to be sure that the slave(s) get all the replication stream.

If, for example you don't monitor the system for a week, then you should keep at least 7 days' worth of binlogs.

The "relay logs" exist on each "slave". This contains a copy of the corresponding master's binlog (but usually not broken into files in the same way). Each relay log is deleted immediately after applying all the items in it. Hence, you will normally see exactly 1 relay log.

If you see multiple relay logs, check the file "relay...index" (or something like that). It says what relay files it is waiting to read. Any extra log files on disk are trash from something.

If more than one relay log is mentioned in the index file, then replication is probably stuck, or "behind"...

SHOW SLAVE STATUS;
If replication is running smoothly, there will be two Yes lines and no No lines. And Last_error will be empty. And Seconds_behind_master will be 0 (seconds) or small, not null.

If there is a Last_error, that is your clue of what to fix. If not, but either (or both) Slave...running is No, then try
SLAVE STOP;
SLAVE START;

Options: ReplyQuote


Subject
Views
Written By
Posted
2892
October 13, 2010 03:27AM
844
October 13, 2010 07:31AM
899
October 13, 2010 01:01PM
Re: PURGE BIN LOGS FILES NOT WORKS
1242
October 13, 2010 10:51PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.