# RESET

## Syntax

```sql
RESET reset_option [, reset_option] ...
```

## Description

The `RESET` statement is used to clear the state of various server operations. You must have the [RELOAD privilege](https://github.com/mariadb-corporation/mariadb-docs/blob/main/server/reference/sql-statements/account-management-sql-commands/grant.md) to execute`RESET`.

`RESET` acts as a stronger version of the [FLUSH](https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/flush-commands/flush) statement.

The different `RESET` options are:

| Option                                                                                                                               | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| SLAVE \["connection\_name"] \[ALL]                                                                                                   | Deletes all [relay logs](https://mariadb.com/docs/server/server-management/server-monitoring-logs/binary-log/relay-log) from the slave and reset the replication position in the master [binary log](https://mariadb.com/docs/server/server-management/server-monitoring-logs/binary-log).                                                                                                                                                                                                                    |
| [MASTER](https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/replication-statements/reset-master) | Deletes all old binary logs, makes the binary index file ([--log-bin-index](https://mariadb.com/docs/server/server-management/starting-and-stopping-mariadb/mariadbd-options)) empty and creates a new binary log file. This is useful when you want to reset the master to an initial state. If you want to just delete old, not used binary logs, you should use the [PURGE BINARY LOGS](https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/purge-binary-logs) command. |
| QUERY CACHE                                                                                                                          | Removes all queries from [the query cache](https://mariadb.com/docs/server/ha-and-performance/optimization-and-tuning/buffers-caches-and-threads/query-cache). See also [FLUSH QUERY CACHE](https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/flush-commands/flush-query-cache).                                                                                                                                                                                         |

<sub>*This page is licensed: GPLv2, originally from*</sub> [<sub>*fill\_help\_tables.sql*</sub>](https://github.com/MariaDB/server/blob/main/scripts/fill_help_tables.sql)

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/reset.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
