前言
MySQL进行主主复制或主从复制的时候会在home目录下面产生相应的relay log,本文档总结这些相关参数的定义及解释.
1. 中继日志概念
什么是relay log
The relay log, like the binary log, consists of a set of numbered files containing events that describe database changes, and an index file that contains the names of all used relay log files.
The term “relay log file” generally denotes an individual numbered file containing database events. The term”relay log” collectively denotes the set of numbered relay log files plus the index file
理解:relay log很多方面都跟binary log差不多。
区别是:从服务器I/O线程将主服务器的二进制日志读取过来记录到从服务器本地文件,然后SQL线程会读取relay-log日志的内容并应用到从服务器,从而使从服务器和主服务器的数据保持一致
2. relay log参数说明
通过语句:show variables like ‘%relay%’,查看先骨干的relay的所有相关参数
mysql> show variables like ‘%relay%’;
+———————–+—————-+
| Variab