1

I am looking for a way to set up MariaDB replication from a replica. My configuration looks as following:

First datacenter: Primary + 3 replicas connected via private switch

Second datacenter: Primary + 3 replicas connected via private switch

Primary from second datacenter should replicate from primary from first dataceter via public network (this is working) And replicas from second dataceter should replicate from primary from second datacenter via private network.

The problem is that configuring Primary from second datacenter to replicate from first Primary, then it is not creating own binlog (binlog is on "log-bin", binlog file is created but empty all time) so Replicas cannot replicate from it. Is there any way to change it?

1 Answer 1

2

Both of these are needed:

log_bin
log_slave_updates

Be aware that if the Primary in the second DC goes down, the Replicas in the same DC will not be receiving updates. A partial workaround is to have some of the Replicas in DC-2 replicate directly from the Primary in DC-1.

2
  • log_slave_updates, exactly what i was looking for! thank you!
    – forke
    Sep 27, 2022 at 16:38
  • @forke - Yeah, LOTS of people get tripped up by it.
    – Rick James
    Sep 27, 2022 at 19:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.