XtraDB Cluster install on active Mysql host

I have an active Mysql host/database with databases/data. I tried to convert this to an XtraDB Cluster by doing the following:

  1. Stop current mysql service.
  2. Rename /var/lib/mysql to /var/lib/mysql_back
  3. Install Percona XtraDB Cluster software.
  4. Rename new /var/lib/mysql to /var/lib/mysql_perc
  5. Rename /var/lib/mysql_back to /var/lib/mysql
  6. Start mysql service.

Not sure this is the way to go. Should I create a blank XtraDB database config and import any data from my current system? I can restart mysql but the service hangs in ‘activating’ status.

1 Like

You did not need to do steps 2-5. PXC installs as a drop-in-replacement to standard MySQL.

  1. stop mysql
  2. install PXC packages
  3. configure /etc/my.cnf to add minimum wsrep_* parameters
  4. systemctl start mysql@bootstrap

You now have a cluster of 1 node. Add more nodes and they will auto-join and auto-sync the data.

1 Like