本站中文解释
MySQL的sql_log_off参数变量用来禁止将SQL语句记录到日志文件中,即使记录被激活也不会被记录。它的这一设置可以帮助限制SQL查询日志文件的大小以及当MySQL使用实时重定向时的延迟。
要设置sql_log_off,可以在MySQL的配置文件my.cnf中设置:sql_log_off = 1。或者可以在MySQL语句执行过程中设置,使用命令: SET sql_log_off = 1。
官方英文解释
sql_log_off
System Variable | sql_log_off |
---|---|
Scope | Global, Session |
Dynamic | Yes |
Type | Boolean |
Default Value | OFF |
Valid Values |
|
This variable controls whether logging to the general query
log is disabled for the current session (assuming that the
general query log itself is enabled). The default value is
OFF
(that is, enable logging). To disable
or enable general query logging for the current session, set
the session sql_log_off
variable to ON
or OFF
.
Setting the session value of this system variable is a
restricted operation. The session user must have privileges
sufficient to set restricted session variables. See
Section 5.1.8.1, “System Variable Privileges”.