RESET

You are viewing an old version of this article. View the current version here.

语法

RESET reset_option [, reset_option] ...

说明

RESET 语句是用来清除服务器中中各种命令的操作状态。而且一定要有RELOAD privilege 权限,才能执行RESET

RESET 扮演的是一个加强版的FLUSH 角色。

下面是 RESET 的各种操作:

OptionDescription
SLAVE ["connection_name"] [ALL]Deletes all relay logs from the slave and reset the replication position in the master binary log.
MASTERDeletes all old binary logs, makes the binary index file (--log-bin-index) 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 command.
QUERY CACHERemoves all queries from the query cache. See also FLUSH QUERY CACHE.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.