Mysql log_slave_updates 參數


官網說明:

Normally, a slave does not log to its own binary log any updates that are received from a master server. This option tells the slave to log the updates performed by its SQL thread to its own binary log. For this option to have any effect, the slave must also be started with the --log-bin option to enable binary logging. Prior to MySQL 5.5, the server would not start when using the --log-slave-updates option without also starting the server with the --log-bin option, and would fail with an error; in MySQL 5.5, only a warning is generated. (Bug #44663) --log-slave-updates is used when you want to chain replication servers. For example, you might want to set up replication servers using this arrangement:

A -> B -> C


Here, A serves as the master for the slave B, and B serves as the master for the slave C. For this to work, B must be both a master and a slave. You must start both A and B with --log-bin to enable binary logging, and B with the --log-slave-updates option so that updates received from A are logged by B to its binary log.



通常情況,從服務器從主服務器接收到的更新不記入它的二進制日志。該選項告訴從服務器將其SQL線程執行的更新記入到從服務器自己的二進制日志。為了使該選項生效,還必須用--logs-bin選項啟動從服務器以啟用二進制日志。如果想要應用鏈式復制服務器,應使用--logs-slave-updates。例如,可能你想要這樣設置:

A -> B -> C

也就是說,A為從服務器B的主服務器,B為從服務器C的主服務器。為了能工作,B必須既為主服務器又為從服務器。你必須用--logs-bin啟動A和B以啟用二進制日志,並且用--logs-slave-updates選項啟動B。

 

這樣來自A的事務能記錄在B的二進制文件中,再傳送給C


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM