RESET

Use this MySQL statement to reset certain server settings and log files.

Syntax

Below is the syntax for this command. Text within square brackets (i.e, [ and ] ) are optional. Choices are separated by bars (i.e, | ). Ellipses preceded by a comma indicates a repeating pattern. Ellipses before or after syntax are used to highlight a relevant except from the larger syntax. Text displayed in italic letters represent text that should be replaced with the specific names related to the database (e.g., column with the name of the column).

RESET [QUERY CACHE|MASTER|SLAVE]

Explanation

Use this MySQL statement to reset certain server settings and log files. The RELOAD privilege is required to use this statement. The QUERY CACHE option clears the cache containing SQL query results.

Use the MASTER option to reset a master used for replication. This MySQL statement must be executed from the master server itself. It will start a new binary log file, as well as delete the binary log file names from in the index file, and delete the contents of the binary log index file. The SLAVE option is used to reset a slave used for replication and must be executed from the slave itself. It will start a new relay log file and delete any existing ones, as well as delete its notation of its position in the master's binary log.

Examples

Below is an example of this MySQL statement:

RESET QUERY CACHE;
Query OK, 0 rows affected (0.00 sec)