I have 2 masters and 1 slave (replicating form both masters).

M1- MariaDB 10.4.11 M2- MariaDB 10.4.16 S1- MariaDB 10.4.12

I want to upgrade this LIVE system to 10.5 with possibly 0 downtime. The idea is this:

  1. upgrade slave S1 (this is used mainly for backups, not queried at all)
  2. switch all traffic to M2, stop M1 and upgrade M1
  3. turn on M1 and sync it from M2 - at this stage I will have active master M2 running old 10.4 MariaDB, but both standby master M1 and slave S1 are already on 10.5
  4. switch all traffic to M1, stop M2 and upgrade M2
  5. sync M2 from M1 and keep it as standby master

I guess my main question is - Is MariaDB 10.5 <-> 10.4 replication compatible? Any particular issues I should look for?


  • Your setup sounds impossible. Are M1 and M2 replicating to each other (dual-master)? And the Replica is receiving updates from each Primary? Won't inserts be sent to the Replica twice!?
    – Rick James
    Commented Nov 10, 2020 at 20:36
  • @RickJames yes they are sent twice. I use GTID and I use also this mariadb.com/docs/reference/mdb/system-variables/… . Therefore I am safe.
    – michnovka
    Commented Nov 10, 2020 at 22:36

2 Answers 2


A MariaDB replica can replicate from an older master. The other way around won't work.

You should add a step 2.5: stop replicating from M1 to M2 (even if it's just a standby master). After step 4, M1 can replicate from M2 again.


Fast forward few months and I want to give warning to using different major versions for replication. Even when slave is newer than master, and hence should keep compatibility, there are possible SQL changes that can cause issue. One example I faced

UPDATE table SET count=1 WHERE offset=1

This query executes just fine on MariaDB 10.4. But there is a keyword offset added in MariaDB 10.5 and it will NOT execute, instead throw an error. Of course if you are very professional and you escape everything (like you should), then you have

UPDATE `table` SET `count`=1 WHERE `offset`=1

In which case there will be no issues.

But with statement based replication, keep in mind that slave can stop replication due to interpreting SQL queries differently.

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.