简体   繁体   English

Mysql 主从复制

[英]Mysql master slave replication

While performing mysql replication i am observing below issue:在执行 mysql 复制时,我观察到以下问题:

Pre requistes: I have three mysql databases all located on different machines.先决条件:我有三个 mysql 数据库都位于不同的机器上。 Lets suppose we have db1,db2,db3 and each of them have one table language.假设我们有 db1,db2,db3,它们每个都有一种表语言。 db1 is the master of db2. db1是db2的master。 db2 is the slave of db1 and master of db3. db2是db1的slave和db3的master。 db3 is the slave of db2 db3 是 db2 的从机

Scenario 1 while inserting something in language table of db1 changes are reflected to db2 in language tables but it doesnot propagate to db3 language table.场景 1 在 db1 更改的语言表中插入内容时会反映到语言表中的 db2 但它不会传播到 db3 语言表。

Expectation - since db3 is the slave of db2 then above change should reflect in db3 as well but its not happening预期 - 由于 db3 是 db2 的从属设备,因此上述更改也应反映在 db3 中,但不会发生

Scenario 2 but while inserting something in language table of db2 changes are reflected in language table of db3 perfectly.场景 2 但是在 db2 的语言表中插入一些东西时,变化会完美地反映在 db3 的语言表中。

I dont know whats the gap why insertion in db1 is propagating only to db2 and not db3我不知道为什么 db1 中的插入仅传播到 db2 而不是 db3 的差距是什么

Please suggest if any configuration needs to be done请建议是否需要进行任何配置

You probably need to turn on the log_slave_updates flag.您可能需要打开log_slave_updates标志。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM