13.4.1.2 RESET MASTER Syntax

RESET MASTER

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 removes
all binary log files that are listed
in the index file, leaving only a single, empty binary log
file with a numeric suffix of .000001,
whereas the numbering is not reset by
PURGE BINARY LOGS.

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.

User Comments

NOTE: This command LOCKS EVERYTHING and prohibits connections to the database engine while RESET MASTER is doing its thing! This can be many minutes if you have a lot of big masterXX.bin files to delete. Ctrl-C is trapped (does not work) from your mysql> prompt while this is underway. So once it starts, you are committed to wait, and who knows what harm might come from trying harder to abort it. Use PURGE on small bites at a time if you want to avoid this locking problem.