RESETreset_option
[,reset_option
] ...reset_option
: { MASTER | REPLICA | SLAVE }
The RESET
statement is used to clear the state of various server operations. RESET
语句用于清除各种服务器操作的状态。You must have the 您必须具有RELOAD
privilege to execute RESET
.RELOAD
权限才能执行RESET
。
For information about the 有关删除持久化全局系统变量的RESET PERSIST
statement that removes persisted global system variables, see Section 13.7.8.7, “RESET PERSIST Statement”.RESET PERSIST
语句的信息,请参阅第13.7.8.7节,“RESET PERSIST语句”。
RESET
acts as a stronger version of the FLUSH
statement. RESET
充当FLUSH
语句的更强大版本。See Section 13.7.8.3, “FLUSH Statement”.请参阅第13.7.8.3节,“FLUSH语句”。
The RESET
statement causes an implicit commit. RESET
语句导致隐式提交。See Section 13.3.3, “Statements That Cause an Implicit Commit”.请参阅第13.3.3节,“导致隐式提交的语句”。
The following list describes the permitted 以下列表描述了允许的RESET
statement reset_option
values:RESET
语句reset_option
值:
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.删除索引文件中列出的所有二进制日志,将二进制日志索引文件重置为空,并创建新的二进制日志文件。
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. 还可以通过删除任何现有的中继日志文件并开始新的中继日志文件来重置中继日志。Use 使用RESET REPLICA
in place of RESET SLAVE
from MySQL 8.0.22.RESET REPLICA
代替MySQL 8.0.22中的RESET SLAVE
。