您的位置:首页 > 数据库 > MySQL

MYSQL 中binlog 参数的记录

2016-04-26 10:48 501 查看
http://dev.mysql.com/doc/refman/5.7/en/replication-options-binary-log.html

binlog_cache_size


Command-Line Format
--binlog_cache_size=#
System VariableName
binlog_cache_size
Variable ScopeGlobal
Dynamic VariableYes
Permitted Values (32-bit platforms)Type
integer
Default
32768
Min Value
4096
Max Value
4294967295
Permitted Values (64-bit platforms)Type
integer
Default
32768
Min Value
4096
Max Value
18446744073709551615
要注意的是,SIZE的单位是BYTE.

32768是指容量为32k。

参见http://blog.csdn.net/lxpbs8851/article/details/38455223

show status like '%binlog%';

stmt就是statement的意思

Binlog_cache_disk_use  (事务类)二进志日志缓存的已经存在硬盘的条数

Binlog_cache_use    (事务类)二进制日志已缓存的条数(内存中) 注意,这个不是容量,而是事务个数。每次有一条事务提交,都会有一次增加

Binlog_stmt_cache_disk_use (非事务类)二进志日志缓存的已经存在硬盘的条数

Binlog_stmt_cache_use (非事务类)二进制日志已缓存的条数(内存中) 非事务型的语句,都存在这儿,比如MYISAM引擎的表,插入记录就存在这儿



binlog_cache_use和binlog_cache_disk_use两者结合可以用来调整binlog_cache_size的大小
binglog_stmt_cache_use和binlog_stmt_cache_disk_use两者结合可以有来调整 binlog_stmt_cache_size的大小

这两个值是单独设置的。

感谢 http://blog.itpub.net/25099483/viewspace-1469049/
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: