MySQL Replication-- relay log update

How to save the settings received from the node to the primary database BINLOG

sync_relay_log: 
Set how to synchronize relay relay logs to the log file. 
When sync_relay_log = 0, the service does not synchronize MySQL relay log file, depending on the operating system to synchronize periodically. 
When sync_relay_log = N (N> 0) , then after every N sync_relay_log perform a synchronization event (call fdatasync ()) for the relay log file.

 

How to set save progress information received from the node main library BINLOG

master_info_repository: 
used to set how to save the received information from the master node to the site of the repository BINLOG, optional parameters optional parameter FILE | TABLE, default parameters for the FILE. 

sync_master_info: 
parameter value N (int), for setting the event after N times when sync_master_info synchronization information to a file or to synchronize the table, the default parameter value 1000 
when master_info_repository = FILE, if sync_master_info = 0, then the service will not MySQL master.info file to synchronize, depending on the operating system to synchronize on a regular basis. 
When master_info_repository = TABLE, if sync_master_info = 0, then the MySQL service data is not updated mysql.slave_master_info of. 
Sync_master_info modify the parameter values do not need to shut down the replication process, modified with immediate effect.

 

How to set save progress information from the node application RELAYLOG

relay_log_info_repository: 
for how to set the location to save log information of the application from the relay node, the optional parameter optional parameter FILE | TABLE, default parameters for the FILE. 
If set to FILE, relay-log.info information stored in the file, if set to TABLE, information is stored in the mysql.slave_relay_log_info. 
If you are using multi-source copy, you must use the TABLE parameter values. 
Relay_log_info_repository modify parameter values need to close and then modify the copy process and then restart replication thread. 

: sync_relay_log_info 
for setting how to use the location information to the relay log files and synchronization tables, default parameters 10,000 
when sync_relay_log_info = FILE: 
	If sync_relay_log_info = 0, the service does not synchronize the MySQL files relay-log.info operation, depending on the operating system to synchronize periodically. 
	If sync_relay_log_info = N (N> 0) , then after each performed transaction information using the N fdatasync () relay-log.info files to synchronize. 
When sync_relay_log_info = TABLE mysql.slave_relay_log_info table and use the transaction storage engine as Innodb: 
	updated data mysql.slave_relay_log_info table after each transaction, ignoring sync_relay_log_info settings. 
When sync_relay_log_info = TABLE mysql.slave_relay_log_info table and not used as storage engine MyISAM: 
	If sync_relay_log_info = 0, the data table is not updated mysql.slave_relay_log_info.
	If the data mysql.slave_relay_log_info sync_relay_log_info = N (N> 0), then each of the N transactions executed to update the table.

 

How to set the recovery RELAY LOG

relay_log_recovery 
for setting how to fix the problem when the relay-log, the default value is 0 (do not open) 
when the slave down from the library, if the relay-log damaged, resulting in a portion of the relay log not processed, all but the waiver performed relay-log, and log reacquired from the master, thus ensuring the integrity of the relay-log 

after MTS when turned on, if the set relay_log_recovery = 1, the force kill unexpected restart or reboot the node, there are mistakes : 
Relay-log-Recovery CAN not BE the Executed with the when stopped at The Slave WAS AN error or killed in the MODE MTS

 

 

If relay_log_info_repository = file from the node or sync_relay_log_info <> 1, if the fault restarting of the node, may occur from the node has been applied article XXX log, but relay_log_info recorded for the first XXX-N position, from the node from XXX-N redo logs, this part of the relay log is repeatedly executed, error messages 1032 and 1062, that synchronization fails. Therefore recommend the following settings:

master_info_repository=TABLE
relay_log_info_repository=TABLE
relay_log_recovery=1

 

Guess you like

Origin www.cnblogs.com/gaogao67/p/11202864.html