Documentation Home
MySQL 9.0 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 40.0Mb
PDF (A4) - 40.1Mb
Man Pages (TGZ) - 258.8Kb
Man Pages (Zip) - 365.9Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb


15.7.8.6 RESET Statement

RESET reset_option [, reset_option] ...

reset_option: {
    BINARY LOGS AND GTIDS
  | REPLICA
}

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

For information about the RESET PERSIST statement that removes persisted global system variables, see Section 15.7.8.7, “RESET PERSIST Statement”.

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

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

The following list describes the permitted RESET statement reset_option values:

  • RESET BINARY LOGS AND GTIDS

    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.

  • RESET REPLICA

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