Documentation Home
MySQL 5.7 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 35.6Mb
PDF (A4) - 35.6Mb
PDF (RPM) - 34.7Mb
EPUB - 8.7Mb
HTML Download (TGZ) - 8.5Mb
HTML Download (Zip) - 8.5Mb
HTML Download (RPM) - 7.3Mb
Eclipse Doc Plugin (TGZ) - 9.3Mb
Eclipse Doc Plugin (Zip) - 11.5Mb
Man Pages (TGZ) - 203.5Kb
Man Pages (Zip) - 310.2Kb
Info (Gzip) - 3.3Mb
Info (Zip) - 3.3Mb
Excerpts from this Manual

14.7.6.6 RESET Syntax

RESET reset_option [, reset_option] ...

The RESET statement is used to clear the state of various server operations. You must have the RELOAD privilege to execute RESET.

RESET acts as a stronger version of the FLUSH statement. See Section 14.7.6.3, “FLUSH Syntax”.

The RESET statement causes an implicit commit. See Section 14.3.3, “Statements That Cause an Implicit Commit”.

In MySQL 5.7.1, gtid_next must be set to AUTOMATIC before issuing this statement. This restriction does not apply in MySQL 5.7.2 or later. (Bug #16062608, Bug #16715809, Bug #69045)

reset_option can be any of the following:

  • MASTER

    Deletes all binary logs listed in the index file, resets the binary log index file to be empty, and creates a new binary log file.

  • QUERY CACHE

    Removes all query results from the query cache.

  • SLAVE

    Makes the slave forget its replication position in the master binary logs. Also resets the relay log by deleting any existing relay log files and beginning a new one.


User Comments
  Posted by Daevid Vincent on December 23, 2009
Just a word of caution, if you're using replication, then DO NOT use the "RESET MASTER" to consolidate your mysql-bin.00000X files.

This page fails to be explicit about mentioning what this page does, nor is there even a link to this critical information:
http://dev.mysql.com/doc/refman/5.0/en/reset-master.html

The correct command is "PURGE BINARY LOGS"
http://dev.mysql.com/doc/refman/5.0/en/purge-binary-logs.html

  Posted by Derek Downey on September 4, 2011
It may be obvious, but RESET commands are not written to the Binary Log.

This is particularly pertinent to RESET QUERY CACHE command.
Sign Up Login You must be logged in to post a comment.