Where the open source database community meets: Use code PERCONA75 and secure your spot for Percona Live.  Register

Migrating several single standalone MySQL server to one Percona XtraDB Cluster… MariaDB to the rescue !

December 18, 2012
Author
Frederic Descamps
Share this Post:

Some weeks ago I had to migrate some independent MySQL servers (some standard MySQL masters, and some just standalone) to a Percona XtraDB Cluster of 3 nodes.

So the easiest way would be to configure each node to become also an asynchronous slave of one of the production servers.
Like illustrated here:

But in this case there was one major issue, the tables where MyISAM and this is not really recommended with Galera replication even if it’s now supported.

Preparing the slaves would then become a loop :

So in this case that should have be done 3 times… that could take some time ! And then, if the single production servers where more than 3 ?

So I decided to use a wonderful feature of MariaDB 10: Multi-source replication.

MariaDB’s multi-source-replication doesn’t have any conflict resolution. The assumption is that there are no conflicts in data between the different masters. Which is the case here, all standalone servers handle different schemas.

I configured the MariaDB server to be slave of all production servers, changed the table engine to InnoDB on it and chose one node of the PXC to be the async slave of that MariaDB server. It worked like a charm and the migration of production to Percona XtraDB Cluster became very easy.

Thank you MariaDB’s team for this feature.

When a sever (a node) is member of a Percona XtraDB Cluster is also standard slave (standard asynchronous replication of MySQL), it can spread in the cluster all statements received from the master if log_slave_updates is enabled.

 

0 0 votes
Article Rating
Subscribe
Notify of
guest

7 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
M
M
13 years ago

In your pseudo code, perhaps you meant that you would do SST / get galera running and then for each node, import a .sql script and start standard MySQL replication from the respective hosts (If I understand correctly, the SST would just throw away local data and get a copy of the donor)

Ajay
Ajay
6 years ago
Reply to  M

How migrate stand alone server to percona cluster.share link

Ajay
Ajay
6 years ago
Reply to  M

Kindly share link for MySQL stand alone to percona migration.is it possible configure replication

MySQL user
13 years ago

If I understand correctly, the SST would just throw away local data and get a copy of the donor

Aurélien LEQUOY
Aurélien LEQUOY
11 years ago

More MyISAM on cluster will fuck your GTID =)

sfrjames
sfrjames
8 years ago

Possible to give a little direction on Async setup of that PCX slave node, Ive got to migrate 3 medium size DB from mariaDB to a Percona cluster in STRICT mode

Far
Enough.

Said no pioneer ever.
MySQL, PostgreSQL, InnoDB, MariaDB, MongoDB and Kubernetes are trademarks for their respective owners.
© 2026 Percona All Rights Reserved