涉及到复制和二进制日志中的选项和变量-Replication and Binary Logging Options and Variables

Posted 熊出陌

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了涉及到复制和二进制日志中的选项和变量-Replication and Binary Logging Options and Variables相关的知识,希望对你有一定的参考价值。

在搭建复制中,有些参数需要我们留意,在这里罗列出来,供大家参考一下,以GTID为基础

  1. --server-id

server-id:这是一个全局的可动态调整的变量,取值范围为0-4294967295,也就是2的32次方减1,这个选项必须在master和slave中都分别进行设置,如果不设置保持默认,则在连接过程中会产生错误。从而复制失败,将这个参数配置在my.cnf配置文件中,然后重启生效

  2. --server_uuid

server_uuid:这是一个全局只读的变量,非动态变量,以一个字符串的形式存在

+---------------+--------------------------------------+
| Variable_name | Value                                |
+---------------+--------------------------------------+
| server_uuid   | a0c06ec7-fef0-11e6-9f85-525400a7d662 |
+---------------+--------------------------------------+
1 row in set (0.00 sec)

这个字符串,在服务器启动的时候,是直接去读数据目录中的auto.cnf文件,即

[[email protected]01 ~]# cat /data/mysql/mysql3306/data/auto.cnf 
[auto]
server-uuid=a0c06ec7-fef0-11e6-9f85-525400a7d662

可以看到,跟客户端查出来的是等值的。如果auto.cnf文件并不存在的时候,则会生成一个新的UUID,同时创建auto.cnf文件,这个文件属于自动生成,不要去写或者更改里面的内容,在SLAVE端开始start slave后,用SHOW SLAVE STATUS可查看到MASTER的UUID,而在MASTER中,使用SHOW SLAVE HOTS可查看SLAVE中的UUID

 

  3. 变量大杂烩---参数众多,直接从官网拷贝下来

Option or Variable Name
Command LineSystem VariableStatus Variable
Option FileScopeDynamic
Notes

abort-slave-event-count

Yes No No
Yes   No

DESCRIPTION: Option used by mysql-test for debugging and testing of replication   mysql-test用于调试和测试复制的选项

binlog_gtid_simple_recovery

Yes Yes No
Yes Global No

DESCRIPTION: Controls how binary logs are iterated during GTID recovery 控制GTID在恢复期间如何迭代二进制日志

Com_change_master

No No Yes
No Both No

DESCRIPTION: Count of CHANGE MASTER TO statements  change master to 语句的统计

Com_show_master_status

No No Yes
No Both No

DESCRIPTION: Count of SHOW MASTER STATUS statements SHOW MASTER STATUS语句统计

Com_show_new_master

No No Yes
No Both No

DESCRIPTION: Count of SHOW NEW MASTER statements  SHOW NEW MASTER 语句的统计

Com_show_slave_hosts

No No Yes
No Both No

DESCRIPTION: Count of SHOW SLAVE HOSTS statements  SHOW SALVE HOSTS语句的统计

Com_show_slave_status

No No Yes
No Both No

DESCRIPTION: Count of SHOW SLAVE STATUS statements SHOW SALVE STATUS 语句统计

Com_show_slave_status_nonblocking

No No Yes
No Both No

DESCRIPTION: Count of SHOW SLAVE STATUS NONBLOCKING statements SHOW SLAVE STATUS NONBLOCKING 语句统计

Com_slave_start

No No Yes
No Both No

DESCRIPTION: Count of START SLAVE statements START SLAVE 语句统计

Com_slave_stop

No No Yes
No Both No

DESCRIPTION: Count of STOP SLAVE statements STOP SALVE语句统计

disconnect-slave-event-count

Yes No No
Yes   No

DESCRIPTION: Option used by mysql-test for debugging and testing of replication  mysql-test用于调试和测试复制的选项

enforce-gtid-consistency

Yes Yes No
Yes Global Yes

DESCRIPTION: Prevents execution of statements that cannot be logged in a transactionally safe manner 防止不能以事务安全方式记录的执行语句

enforce_gtid_consistency

Yes Yes No
Yes Global Yes

DESCRIPTION: Prevents execution of statements that cannot be logged in a transactionally safe manner 防止不能以事务安全方式记录的执行语句

executed-gtids-compression-period

Yes No No
Yes   No

DESCRIPTION: Deprecated and will be removed in a future version. Use the renamed gtid-executed-compression-period instead.在后期版本将被弃用,使用重命名的gtid-executed-compression-period 代替

executed_gtids_compression_period

No Yes No
No Global Yes

DESCRIPTION: Deprecated and will be removed in a future version. Use the renamed gtid_executed_compression_period instead. 在后期版本将被弃用,使用重命名的gtid-executed-compression-period 代替

gtid-executed-compression-period

Yes No No
Yes   No

DESCRIPTION: Compress gtid_executed table each time this many transactions have occurred. 0 means never compress this table. Applies only when binary logging is disabled. 每次发生此很多事务时压缩gtid_executed表。 0表示不压缩此表。 仅在禁用二进制日志记录时应用。

gtid-mode

Yes Yes No
Yes Global Yes

DESCRIPTION: Controls whether GTID based logging is enabled and what type of transactions the logs can contain 控制是否启用基于GTID的日志记录以及日志可包含的事务类型

gtid_executed

No Yes No
No Global No

DESCRIPTION: Global: All GTIDs in the binary log (global) or current transaction (session). Read-only.全局:二进制日志(全局)或当前事务(会话)中的所有GTID。 只读。

gtid_executed_compression_period

No Yes No
No Global Yes

DESCRIPTION: Compress gtid_executed table each time this many transactions have occurred. 0 means never compress this table. Applies only when binary logging is disabled.每次发生此很多事务时压缩gtid_executed表。 0表示不压缩此表。 仅在禁用二进制日志记录时应用。

gtid_mode

No Yes No
No Global Yes

DESCRIPTION: Controls whether GTID based logging is enabled and what type of transactions the logs can contain控制是否启用基于GTID的日志记录以及日志可包含的事务类型

gtid_next

No Yes No
No Session Yes

DESCRIPTION: Specifies the GTID for the next statement to execute. See documentation for details.指定要执行的下一个语句的GTID。 有关详细信息,请参阅文档。

gtid_owned

No Yes No
No Both No

DESCRIPTION: The set of GTIDs owned by this client (session), or by all clients, together with the thread ID of the owner (global). Read-only.此客户端(会话)拥有的一组GTID或所有客户端拥有的GTID以及所有者的线程ID(全局)。 只读。

gtid_purged

No Yes No
No Global Yes

DESCRIPTION: The set of all GTIDs that have been purged from the binary log.从二进制日志中清除的所有GTID的集合

init_slave

Yes Yes No
Yes Global Yes

DESCRIPTION: Statements that are executed when a slave connects to a master SLAVE连接到MASTER时执行语句

log-slave-updates

Yes Yes No
Yes Global No

DESCRIPTION: Tells the slave to log the updates performed by its SQL thread to its own binary log  告诉SLAVE将其SQL线程执行的更新记录到自己的二进制日志中

log_slave_updates

Yes Yes No
Yes Global No

DESCRIPTION: Whether the slave should log the updates performed by its SQL thread to its own binary log. Read-only; set using the --log-slave-updates server option.SLAVE是否应该将其SQL线程执行的更新记录到自己的二进制日志中。 只读; 使用--log-slave-updates服务器选项设置。

log_statements_unsafe_for_binlog

No Yes No
No Global Yes

DESCRIPTION: Disables error 1592 warnings being written to the error log 禁用1592错误警告写入到错误日志中

master-info-file

Yes No No
Yes   No

DESCRIPTION: The location and name of the file that remembers the master and where the I/O replication thread is in the master‘s binary logs记录主节点的文件的位置和名称,以及I / O复制线程在主节点二进制日志中的位置和名称

master-info-repository

Yes No No
Yes   No

DESCRIPTION: Whether to write master status information and replication I/O thread location in the master‘s binary logs to a file or table.是否将主状态信息和主机二进制日志中的复制I / O线程位置写入文件或表。

master-retry-count

Yes No No
Yes   No

DESCRIPTION: Number of tries the slave makes to connect to the master before giving up 在断开之前SLAVE连接到MASTER的尝试次数

master_info_repository

Yes Yes No
Yes Global Yes

DESCRIPTION: Whether to write master status information and replication I/O thread location in the master‘s binary logs to a file or table是否将主状态信息和主机二进制日志中的复制I / O线程位置写入文件或表。

relay-log

Yes Yes No
Yes Global No

DESCRIPTION: The location and base name to use for relay logs   用于中继日志的位置和基本名称

relay-log-index

Yes Yes No
Yes Global No

DESCRIPTION: The location and name to use for the file that keeps a list of the last relay logs 用于保存最后一个中继日志列表的文件的位置和名称

relay-log-info-file

Yes No No
Yes   No

DESCRIPTION: The location and name of the file that remembers where the SQL replication thread is in the relay logs 记录SQL复制线程在中继日志中的位置和文件名称

relay-log-info-repository

Yes No No
Yes   No

DESCRIPTION: Whether to write the replication SQL thread‘s location in the relay logs to a file or a table. 是否将中继日志中的复制SQL线程的位置写入文件或表。

relay-log-recovery

Yes No No
Yes   No

DESCRIPTION: Enables automatic recovery of relay log files from master at startup 在启动时启用从master自动恢复中继日志文件

relay_log_basename

No Yes No
No Global No

DESCRIPTION: Complete path to relay log, including filename 完整中继日志的路径,包括文件名

relay_log_index

Yes Yes No
Yes Global No

DESCRIPTION: The name of the relay log index file 中继日志索引文件的名字

relay_log_info_file

Yes Yes No
Yes Global No

DESCRIPTION: The name of the file in which the slave records information about the relay logs  slave记录有关中继日志信息的文件名字

relay_log_info_repository

No Yes No
No Global Yes

DESCRIPTION: Whether to write the replication SQL thread‘s location in the relay logs to a file or a table 是否将中继日志中的复制SQL线程的位置写入文件或表。

relay_log_purge

Yes Yes No
Yes Global Yes

DESCRIPTION: Determines whether relay logs are purged 确定是否清除中继日志

relay_log_recovery

Yes Yes No
Yes Global Yes

DESCRIPTION: Whether automatic recovery of relay log files from master at startup is enabled; must be enabled for a crash-safe slave.是否启用从master自动恢复中继日志文件; 必须为crash-safe slave启用

relay_log_space_limit

Yes Yes No
Yes Global No

DESCRIPTION: Maximum space to use for all relay logs 对于所有的中继日志使用的最大空间

replicate-do-db

Yes No No
Yes   No

DESCRIPTION: Tells the slave SQL thread to restrict replication to the specified database 指示SLAVE SQL线程将复制限制到指定的数据库

replicate-do-table

Yes No No
Yes   No

DESCRIPTION: Tells the slave SQL thread to restrict replication to the specified table 指示SLAVE SQL线程将复制限制指定到表

replicate-ignore-db

Yes No No
Yes   No

DESCRIPTION: Tells the slave SQL thread not to replicate to the specified database 告诉SLAVE SQL 线程不要复制到指定的数据库

replicate-ignore-table

Yes No No
Yes   No

DESCRIPTION: Tells the slave SQL thread not to replicate to the specified table 告诉SLAVE SQL线程不要复制指定的表

replicate-rewrite-db

Yes No No
Yes   No

DESCRIPTION: Updates to a database with a different name than the original  使用与原始名称不同的名称更新数据库

replicate-same-server-id

Yes No No
Yes   No

DESCRIPTION: In replication, if set to 1, do not skip events having our server id  在复制中,如果设置为1,则不要跳过具有我们的服务器标识的事件

replicate-wild-do-table

Yes No No
Yes   No

DESCRIPTION: Tells the slave thread to restrict replication to the tables that match the specified wildcard pattern 指示从线程将复制限制为与指定通配符模式匹配的表

replicate-wild-ignore-table

Yes No No
Yes   No

DESCRIPTION: Tells the slave thread not to replicate to the tables that match the given wildcard pattern 告诉从线程不要复制到匹配给定通配符模式的表

report-host

Yes Yes No
Yes Global No

DESCRIPTION: Host name or IP of the slave to be reported to the master during slave registration  从注册期间要向主站报告的从的主机名或IP

report-password

Yes Yes No
Yes Global No

DESCRIPTION: An arbitrary password that the slave server should report to the master. Not the same as the password for the MySQL replication user account.从服务器应向主服务器报告的任意密码。 不同于MySQL复制用户帐户的密码。

report-port

Yes Yes No
Yes Global No

DESCRIPTION: Port for connecting to slave reported to the master during slave registration 在从注册期间,用于连接到从的端口报告给主站

report-user

Yes Yes No
Yes Global No

DESCRIPTION: An arbitrary user name that a slave server should report to the master. Not the same as the name used with the MySQL replication user account.从服务器应向主服务器报告的任意用户名。 不同于MySQL复制用户帐户使用的名称。

Rpl_semi_sync_master_clients

No No Yes
No Global No

DESCRIPTION: Number of semisynchronous slaves 半同步从的数量

rpl_semi_sync_master_enabled

No Yes No
No Global Yes

DESCRIPTION: Whether semisynchronous replication is enabled on the master 半同步复制是否在主中被启用

Rpl_semi_sync_master_net_avg_wait_time

No No Yes
No Global No

DESCRIPTION: The average time the master waited for a slave reply 主等待从响应的平均时间

Rpl_semi_sync_master_net_wait_time

No No Yes
No Global No

DESCRIPTION: The total time the master waited for slave replies 主等待从响应的总时间

Rpl_semi_sync_master_net_waits

No No Yes
No Global No

DESCRIPTION: The total number of times the master waited for slave replies 主等待从响应的总次数

Rpl_semi_sync_master_no_times

No No Yes
No Global No

DESCRIPTION: Number of times the master turned off semisynchronous replication 主节点关闭半同步复制的次数

Rpl_semi_sync_master_no_tx

No No Yes
No Global No

DESCRIPTION: Number of commits not acknowledged successfully 未成功确认的提交数

Rpl_semi_sync_master_status

No No Yes
No Global No

DESCRIPTION: Whether semisynchronous replication is operational on the master 主节点上是否可以进行半同步复制

Rpl_semi_sync_master_timefunc_failures

No No Yes
No Global No

DESCRIPTION: Number of times the master failed when calling time functions  调用时间函数时主服务器失败的次数

rpl_semi_sync_master_timeout

No Yes No
No Global Yes

DESCRIPTION: Number of milliseconds to wait for slave acknowledgment 等待从确认的毫秒数

rpl_semi_sync_master_trace_level

No Yes No
No Global Yes

DESCRIPTION: The semisynchronous replication debug trace level on the master  主节点上的半同步复制调试跟踪级别

Rpl_semi_sync_master_tx_avg_wait_time

No No Yes
No Global No

DESCRIPTION: The average time the master waited for each transaction 主等待每个事务的平均时间

Rpl_semi_sync_master_tx_wait_time

No No Yes
No Global No

DESCRIPTION: The total time the master waited for transactions 主等待事务的总时间

Rpl_semi_sync_master_tx_waits

No No Yes
No Global No

DESCRIPTION: The total number of times the master waited for transactions  主节点等待事务的总次数

rpl_semi_sync_master_wait_for_slave_count

No Yes No
No Global Yes

DESCRIPTION: How many slave acknowledgments the master must receive per transaction before proceeding 在继续之前从确认主必须收到的每个事务有多少

rpl_semi_sync_master_wait_no_slave

No Yes No
No Global Yes

DESCRIPTION: Whether master waits for timeout even with no slaves 主是否等待超时,即使没有从

rpl_semi_sync_master_wait_point

No Yes No
No Global Yes

DESCRIPTION: The wait point for slave transaction receipt acknowledgment 从事务接收确认的等待点

Rpl_semi_sync_master_wait_pos_backtraverse

No No Yes
No Global No

DESCRIPTION: The total number of times the master waited for an event with binary coordinates lower than events waited for previously主等待二进制坐标低于以前等待的事件的事件的总次数

Rpl_semi_sync_master_wait_sessions

No No Yes
No Global No

DESCRIPTION: Number of sessions currently waiting for slave replies 当前等待从回应的会话数

Rpl_semi_sync_master_yes_tx

No No Yes
No Global No

DESCRIPTION: Number of commits acknowledged successfully  确认成功提交的数量

rpl_semi_sync_slave_enabled

No Yes No
No Global Yes

DESCRIPTION: Whether semisynchronous replication is enabled on slave  是否在从设备上启用半同步复制

Rpl_semi_sync_slave_status

No No Yes
No Global No

DESCRIPTION: Whether semisynchronous replication is operational on slave 从设备上是否可以进行半同步复制

rpl_semi_sync_slave_trace_level

No Yes No
No Global Yes

DESCRIPTION: The semisynchronous replication debug trace level on the slave 从上的半同步复制调试跟踪级别

rpl_stop_slave_timeout

Yes Yes No
Yes Global Yes

DESCRIPTION: Set the number of seconds that STOP SLAVE waits before timing out. 设置STOP SLAVE在超时前等待的秒数

server_uuid

No Yes No
No Global No

DESCRIPTION: The server‘s globally unique ID, automatically (re)generated at server start 全局唯一ID,在服务启动时候生成

show-slave-auth-info

Yes No No
Yes   No

DESCRIPTION: Show user name and password in SHOW SLAVE HOSTS on this master 在主库上使用SHOW SLAVE STATUS显示用户名和密码

simplified_binlog_gtid_recovery

Yes Yes No
Yes Global No

DESCRIPTION: Controls how binary logs are iterated during GTID recovery  控制在GTID恢复期间如何迭代二进制日志

skip-slave-start

Yes No No
Yes   No

DESCRIPTION: If set, slave is not autostarted 设置后,从同步不会自动开启

slave-checkpoint-group

Yes No No
Yes   No

DESCRIPTION: Maximum number of transactions processed by a multi-threaded slave before a checkpoint operation is called to update progress status. Not supported by MySQL Cluster.多多线程从处理最大事务进程在检查点操作之前被调用来更新的进度情况。 MySQL集群不支持。

slave-checkpoint-period

Yes No No
Yes   No

DESCRIPTION: Update progress status of multi-threaded slave and flush relay log info to disk after this number of milliseconds. Not supported by MySQL Cluster.在这个毫秒数之后,将多线程从和刷新中继日志信息的进度状态更新到磁盘。 MySQL集群不支持。

slave-load-tmpdir

Yes Yes No
Yes Global No

DESCRIPTION: The location where the slave should put its temporary files when replicating a LOAD DATA INFILE statement 复制LOAD DATA INFILE语句时从应置其临时文件的位置

slave-max-allowed-packet

Yes No No
Yes   No

DESCRIPTION: Maximum size, in bytes, of a packet that can be sent from a replication master to a slave; overrides max_allowed_packet.可以从复制主机发送到从机的数据包的最大大小(以字节为单位); 覆盖max_allowed_packet。

slave_net_timeout

Yes Yes No
Yes Global Yes

DESCRIPTION: Number of seconds to wait for more data from a master/slave connection before aborting the read 在中止读取之前等待来自主/从连接的更多数据的秒数

slave-parallel-type

Yes No No
Yes   No

DESCRIPTION: Tells the slave to use database partioning (DATABASE) or timestamp information (LOGICAL_CLOCK) from the master to parallelize transactions. The default is DATABASE. 告诉从使用主数据库中的数据库分区(DATABASE)或时间戳信息(LOGICAL CLOCK)来并行化事务。 默认值为DATABASE

slave-parallel-workers

Yes No No
Yes   No

DESCRIPTION: Number of worker threads for executing events in parallel. Set to 0 (the default) to disable slave multi-threading. Not supported by MySQL Cluster.并行执行事件的工作线程数。 设置为0(默认值)以禁用从多线程。 MySQL集群不支持。

slave-pending-jobs-size-max

Yes No No
No   No

DESCRIPTION: Maximum size of slave worker queues holding events not yet applied. 保持事件尚未应用的从工作线程队列的最大大小

slave-rows-search-algorithms

Yes No No
Yes   No

DESCRIPTION: Determines search algorithms used for slave update batching. Any 2 or 3 from the list INDEX_SEARCH, TABLE_SCAN, HASH_SCAN; the default is TABLE_SCAN,INDEX_SCAN.

slave-skip-errors

Yes Yes No
Yes Global No

DESCRIPTION: Tells the slave thread to continue replication when a query returns an error from the provided list 当查询从提供的列表中返回错误时,告诉从线程继续复制

slave_checkpoint_group

Yes Yes No
Yes Global Yes

DESCRIPTION: Maximum number of transactions processed by a multi-threaded slave before a checkpoint operation is called to update progress status. Not supported by MySQL Cluster.多线程从处理最大事务进程在检查点操作之前被调用来更新的进度情况。 MySQL集群不支持。

slave_checkpoint_period

Yes Yes No
Yes Global Yes

DESCRIPTION: Update progress status of multi-threaded slave and flush relay log info to disk after this number of milliseconds. Not supported by MySQL Cluster.在这个毫秒数之后,将多线程从和刷新中继日志信息的进度状态更新到磁盘。 MySQL集群不支持。

slave_compressed_protocol

Yes Yes No
Yes Global Yes

DESCRIPTION: Use compression on master/slave protocol 在主/从协议上使用压缩

slave_exec_mode

Yes Yes No
Yes Global Yes

DESCRIPTION: Allows for switching the slave thread between IDEMPOTENT mode (key and some other errors suppressed) and STRICT mode; STRICT mode is the default, except for MySQL Cluster, where IDEMPOTENT is always used 允许在IDEMPOTENT模式(键和一些其他错误抑制)和STRICT模式之间切换从线程; STRICT模式是默认值,除了MySQL集群,其中始终使用IDEMPOTENT

Slave_heartbeat_period

No No Yes
No Global No

DESCRIPTION: The slave‘s replication heartbeat interval, in seconds  从节点的复制心跳间隔(以秒为单位)

slave_max_allowed_packet

No Yes No
No Global Yes

DESCRIPTION: Maximum size, in bytes, of a packet that can be sent from a replication master to a slave; overrides max_allowed_packet. 可以从复制主机发送到从机的数据包的最大大小(以字节为单位); 覆盖max_allowed_packet。

Slave_open_temp_tables

No No Yes
No Global No

DESCRIPTION: Number of temporary tables that the slave SQL thread currently has open 从县城当前已打开的临时表空间数量

slave_parallel_type

No Yes No
No Global Yes

DESCRIPTION: Tells the slave to use database partioning (DATABASE) or information (LOGICAL_CLOCK) from master to parallelize transactions. The default is DATABASE. 告诉从使用主数据库中的数据库分区(DATABASE)或时间戳信息(LOGICAL CLOCK)来并行化事务。 默认值为DATABASE

slave_parallel_workers

Yes Yes No
No Global Yes

DESCRIPTION: Number of worker threads for executing events in parallel. Set to 0 (the default) to disable slave multi-threading. Not supported by MySQL Cluster.并行执行事件的工作线程数。 设置为0(默认值)以禁用从多线程。 MySQL集群不支持。

slave_pending_jobs_size_max

No Yes No
No Global Yes

DESCRIPTION: Maximum size of slave worker queues holding events not yet applied. 保持事件尚未应用的从工作线程队列的最大大小

slave_preserve_commit_order

Yes Yes No
No Global Yes

DESCRIPTION: Ensures that all commits by slave workers happen in the same order as on the master to maintain consistency when using parallel worker threads. 确保从属工作者的所有提交按照与主节点上的相同的顺序发生,以便在使用并行工作线程时保持一致性。

Slave_retried_transactions

No No Yes
No Global No

DESCRIPTION: The total number of times since startup that the replication slave SQL thread has retried transactions 自启动以来复制从属SQL线程已重试事务的总次数

slave_rows_search_algorithms

No Yes No
No Global Yes

DESCRIPTION: Determines search algorithms used for slave update batching. Any 2 or 3 from the list INDEX_SEARCH, TABLE_SCAN, HASH_SCAN; the default is TABLE_SCAN,INDEX_SCAN. 确定用于从属更新批处理的搜索算法。 任何2或3从列表INDEX_SEARCH,TABLE_SCAN,HASH_SCAN; 默认值为TABLE_SCAN,INDEX_SCAN。

Slave_running

No No Yes
No Global No

DESCRIPTION: The state of this server as a replication slave (slave I/O thread status) 作为从复制的状态(从IO线程状态)

slave_transaction_retries

Yes Yes No
Yes Global Yes

DESCRIPTION: Number of times the slave SQL thread will retry a transaction in case it failed with a deadlock or elapsed lock wait timeout, before giving up and stopping 放弃和停止之前,从属SQL线程在死锁或失效锁定等待超时之前重试事务的次数

slave_type_conversions

Yes Yes No
Yes Global No

DESCRIPTION: Controls type conversion mode on replication slave. Value is a list of zero or more elements from the list: ALL_LOSSY, ALL_NON_LOSSY. Set to an empty string to disallow type conversions between master and slave.控制复制从站上的类型转换模式。 值是列表中的零个或多个元素的列表:ALL_LOSSY,ALL_NON_LOSSY。 设置为空字符串以禁止主机和从机之间的类型转换。

sql_slave_skip_counter

No Yes No
No Global Yes

DESCRIPTION: Number of events from the master that a slave server should skip. Not compatible with GTID replication. 从服务器应跳过的来自主服务器的事件数。 与GTID复制不兼容。

sync_binlog

Yes Yes No
Yes Global Yes

DESCRIPTION: Synchronously flush binary log to disk after every #th event  在每个第#个事件后,将二进制日志同步刷新到磁盘

sync_master_info

Yes Yes No
Yes Global Yes

DESCRIPTION: Synchronize master.info to disk after every #th event.在每个#事件之后,将master.info同步刷新到磁盘

sync_relay_log

Yes Yes No
Yes Global Yes

DESCRIPTION: Synchronize relay log to disk after every #th event. 在每个#事件后,将中继日志同步刷新到磁盘

sync_relay_log_info

Yes Yes No
Yes Global Yes

DESCRIPTION: Synchronize relay.info file to disk after every #th event. 在卖给#事件之后,将relay.info同步刷新到磁盘

以上是关于涉及到复制和二进制日志中的选项和变量-Replication and Binary Logging Options and Variables的主要内容,如果未能解决你的问题,请参考以下文章

mysql 主从复制原理,概念,故障的检控/分析/处理

MySQL复制:复制的基本步骤

MySQL主从复制的实现过程

聊一聊 MySQL 中的数据编辑过程中涉及的两阶段提交

聊一聊 MySQL 中的数据编辑过程中涉及的两阶段提交

mysql复制的工作原理及主从复制的实现