On MySQL master, “RESET MASTER” command, deletes all binary log files listed in the index file, resets the binary log index file to be empty, and creates a new binary log file. This statement is intended to be used only when the master is started for the first time.

RESET MASTER is not intended to be used while any replication slaves are running. The behavior of RESET MASTER when used while slaves are running is undefined (and thus unsupported), whereas PURGE BINARY LOGS may be safely used while replication slaves are running.

You can issue a PURGE BINARY LOGS every day, using this command:

PURGE BINARY LOGS BEFORE date_sub(now(), interval 7 day);

This purge bynary logs for until the last 7 days.

 

source: http://dev.mysql.com/doc/refman/5.0/en/purge-binary-logs.html

MySQL replication: PURGE BINARY LOGS and RESET MASTER
Tagged on:                     

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.