MySQueaL Resources

resources for mysql admins and developers who are squealing for help

More Resources

Main Doc Pages
Privileges Required
  • RELOAD
Comments
MySQL columns: everywhere I look are tables and columns; life is filled with databases of information to be ordered and grouped. (Ca'Grande, Milan, Italy)

RESET MASTER Statement

This MySQL statement deletes all the binary log files on the master server.

hits past month: 16 ;  last updated: may 4, 2009 - 2:34am ;  parent: MySQL Replication

Syntax

RESET MASTER

Explanation

This MySQL statement deletes all the binary log files on the master server of MySQL when running replication. Binary log files are located in the directory indicated by the value of the --bin-log option of mysqld. The log files 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 MySQL statement will also delete all of the master log files and begin numbering the new file at 000001. To get the slave servers in line with the reset master, execute the RESET SLAVE statement.

Examples

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 on MySQL servers running replication.

Return to MySQL Replication page of our MySQL Documentation