> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/reset.md).

# RESET

## Syntax

```bnf
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](/docs/server/reference/sql-statements/account-management-sql-statements/grant.md) to execute`RESET`.

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

The different `RESET` options are:

| Option                                                                                                               | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| -------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| SLAVE \["connection\_name"] \[ALL]                                                                                   | Deletes all [relay logs](/docs/server/server-management/server-monitoring-logs/binary-log/relay-log.md) from the slave and reset the replication position in the master [binary log](/docs/server/server-management/server-monitoring-logs/binary-log.md).                                                                                                                                                                                                                    |
| [MASTER](/docs/server/reference/sql-statements/administrative-sql-statements/replication-statements/reset-master.md) | Deletes all old binary logs, makes the binary index file ([--log-bin-index](/docs/server/server-management/starting-and-stopping-mariadb/mariadbd-options.md)) 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](/docs/server/reference/sql-statements/administrative-sql-statements/purge-binary-logs.md) command. |
| QUERY CACHE                                                                                                          | Removes all queries from [the query cache](/docs/server/ha-and-performance/optimization-and-tuning/buffers-caches-and-threads/query-cache.md). See also [FLUSH QUERY CACHE](/docs/server/reference/sql-statements/administrative-sql-statements/flush-commands/flush-query-cache.md).                                                                                                                                                                                         |

<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" %}
