Name
RESET MASTER
Synopsis
RESET MASTER
Use this statement to delete all the
binary log files on the master server. Binary logfiles are located in
the directory indicated by the value of the
--bin-log
option of mysqld (see Chapter 10). The logfiles are typically named
log-bin.n, where n is a
six-digit numbering index. Use the SHOW MASTER
LOGS
statement to get a list of log files to be sure.
This
statement will delete all of the master logfiles and begin the
numbering of the new file at 000001. To get the slave servers in line
with the reset master, run the RESET SLAVE
statement. You can run the MASTER
and
SLAVE
options together in a comma-separated list
like so:
RESET MASTER, SLAVE;
This is a recommended method for ensuring consistency.
Get MySQL in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.