I currently have 3 servers:
australiawith the database
germanyare a galera cluster with the database
My final goal is to merge both databases into a single galera cluster:
germanywill be a galera cluster with the databases
Constraints and leeways
germany are public production servers. They all handle read and write queries from various clients 24/7 (
DELETE), so I cannot allow neither downtime nor read-only for any of them.
bruxelles schemas are obviously distinct, so there is no risk of collision when merging.
bruxelles schemas are stable (no
ALTER), so I can copy the schemas from one server to another at any time, without any need to keep the schemas in sync.
The servers are adressed by clients through DNS aliases :
europe.example.com(round-robin handled by HAProxy).
It is easy to add or change DNS aliases (eg. edit
europe.example.com to include
australia in the round-robin, or to exclude
I am not sure that the galera information is relevant for this particular issue, so any answer working for 2 servers (let's say
belgium) should be easily translatable to my issue.
My plan was the following:
- Initiate a replication where
australiais the master and
belgiumis the slave.
australia(no more write on the master, all writes on the slave)
- Shut down
australiaas a new galera cluster member behind
belgiumremoving slave config
pacific.example.comtarget the galera cluster.
However, I found myself unable to initiate the replication. Trying to make
belgium a slave of
australia results in the destrution of
How would you do it?