Moving from standalone Mysql 5.7 to Percona XtraDB cluster

We are planning to have HA for our standalone Mysql 5.7 server. Our first idea is moving from standalone mysql 5.7 to percona mysql with XtraDB cluster (either 3 data nodes or 2 data and 1 arbitrator), anyone can provide a well written guide describing how to achieve it? I would expect percoan blogs have one but cant seem to find (found some from almost decade ago and do not wanna rely on them)

Hi @ahmadzadaa , welcome back to the Percona forums!

You ask a good question - are the blog posts on Percona Database Performance Blog still relevant after several years? The general answer is that YES they are still accurate and valid! I like this particular post as it discusses the main gotchas for those migrating from standalone to PXC:

1 Like

Hello @ahmadzadaa, I definitely do not recommend 2 nodes + 1 arbitrator.

oh, @matthewb can you please give reason? I did not find documents describing any drawbacks on that

@Michael_Coburn to be honest I was hoping for more detailed guide, it does give good information but it is not like a guide which describes the whole process from A to Z with commands/examples. Of course I asked in case such guide/how to exists

You are limited to 2 data nodes. If one goes down, you only have 1 available, thus decreasing you to a single point of failure. The arbitrator functions just like a node but without data. Thus, if you are going through the hassle of setting up that node, you might as well make it a data node.

1 Like

maybe if there is no guide, you can give me some tips? I know some part like:

  1. creating 2/3 secondaries for current primary we have
  2. changing mysql packages to percona mysql packages on new secondaries( I wanna have main mysql untouched and ready to be used as revert mechanism if something goes wrong)

  3. From 3 step I am not sure how to do, I know I can stop all and try to bootstrap cluster with new nodes , test it and so on, But I wonder maybe there is some other proper way?

Using Percona Xtrabackup, take a backup of your existing MySQL. Copy this to new server, node1. Install PXC packages onto this server and configure it according to our docs. Bootstrap start this node. You now have a cluster of 1 using your existing data. Go to node2. Install packages, configure, start node2. Node2 will perform an SST and take a snapshot of node1 for itself. Now you have a cluster of 2 nodes. Repeat for node3.