一起学习网 一起学习网


MySQL Variables flush_time 数据库 参数变量解释及正确配置使用

网络编程 MySQL Variables flush_time 数据库 参数变量解释及正确配置使用 10-18

本站中文解释

flush_time参数用于控制每次检查日志刷新的最大间隔时间,以秒为单位。它指定了每次检查日志并且可能执行刷新的最长间隔时间。如果未设置 flush_time,MySQL的默认行为是每秒执行一次日志检查。

flush_time参数的默认值为 1800 秒,该值可在 my.cnf 文件中设置或通过终端中的SET GLOBAL 语句设置覆盖默认值

修改 flush_time 的方法如下:

1.从终端运行SET GLOBAL flush_time=(数值);例如
SET GLOBAL flush_time=1800;
2.编辑my.cnf文件,在文件中添加下面一行代码:
flush_time = (数值)
例如:flush_time = 1800
重启MySQL服务即可使更改生效。

官方英文解释

flush_time

Command-Line Format--flush-time=#
System Variableflush_time
ScopeGlobal
DynamicYes
TypeInteger
Default Value0
Minimum Value0
Maximum Value31536000
Unitseconds

If this is set to a nonzero value, all tables are closed every
flush_time seconds to free up
resources and synchronize unflushed data to disk. This option
is best used only on systems with minimal resources.

Note

If flush is enabled, the
value of flush_time does
not matter and changes to
flush_time have no effect
on flush behavior.


编辑:一起学习网

标签:终端,文件,数值,日志,间隔时间