Install Percona XtraDB Cluster on CentOS 7 for high availability and uptime. Our Server Management Support team is ready to assist you.
Install Percona XtraDB Cluster on CentOS 7
Percona XtraDB Cluster (PXC) keeps MySQL highly available with real-time replication. It protects against data loss, supports automatic failover, and makes scaling easy. This guide shows you how to install and configure PXC on CentOS 7 step by step.
What is Percona XtraDB Cluster?
Percona XtraDB Cluster keeps MySQL highly available with real-time replication. It ensures zero data loss, automatic failover, load balancing, and easy scaling for disaster recovery. With multiple nodes sharing the same data, your applications stay online even during failures. This makes PXC a reliable choice for businesses that need continuous uptime.

Prerequisites
Before installing Percona XtraDB Cluster on CentOS 7, m
ake sure your server is ready with these steps:
- Root Access: Log in as root or use sudo for all commands.
- Set SELinux to Permissive: Disable strict SELinux to avoid issues.
sudo setenforce 0
sudo sed -i 's/^SELINUX=.*/SELINUX=permissive/g' /etc/selinux/config- Open Firewall Psorts: Allow ports 3306, 4444, 4567, and 4568 for cluster communication.
sudo firewall-cmd --permanent --add-port={3306,4444,4567,4568}/tcp
sudo firewall-cmd --reload
- Install EPEL Repo: Provides extra packages like socat.
sudo yum install epel-release
- Install Socat: Required for cluster node communication.
sudo yum install socat
- Add Percona Repo: Needed to download cluster packages.
sudo yum install http://www.percona.com/downloads/percona-release/redhat/0.1-3/percona-release-0.1-3.noarch.rpm
- Remove Old MySQL Packages: Prevents conflicts during setup.
sudo yum remove mysql-libsCheck this guide to fix common CentOS issues.
Installing and Configuring Percona XtraDB Cluster on CentOS 7
Step 1: Add Percona Repository
sudo yum install -y https://repo.percona.com/yum/percona-release-latest.noarch.rpm
sudo yum makecache fastStep 2: Install the Cluster
sudo yum install -y Percona-XtraDB-Cluster-57
# Or use Percona-XtraDB-Cluster-80 for version 8Step 3: Start and Secure MySQL
sudo systemctl enable --now mysql.service
sudo grep 'temporary password' /var/log/mysqld.log
mysql -u root -p
ALTER USER 'root'@'localhost' IDENTIFIED BY 'NewPassword';
FLUSH PRIVILEGES;
exitStep 4: Configure Replication
Edit the config file:
sudo vim /etc/percona-xtradb-cluster.conf.d/wsrep.cnfAdd cluster details:
wsrep_cluster_address=gcomm://IP1,IP2,IP3
wsrep_node_address=IP_of_this_node
wsrep_node_name=Node_Name
wsrep_sst_auth="sstuser:Password"Step 5: Bootstrap First Node
sudo systemctl stop mysql.service
sudo galera_new_clusterStep 6: Add Other Nodes
sudo systemctl start mysql.serviceStep 7: Check Cluster Size
mysql -u root -p -e "SHOW STATUS LIKE 'wsrep_cluster_size';"
Learn simple steps to list users on CentOS 7.
[Need assistance with a different issue? Our team is available 24/7.]
Conclusion
If you install Percona XtraDB Cluster on CentOS 7, you can keep MySQL highly available, secure, and ready for growth. It gives you real-time replication, smooth failover, and reliable performance, so your applications stay online without interruptions. With the right setup, it becomes a strong solution for businesses that cannot afford downtime.
In brief, our Support Experts demonstrated how to fix the “554 5.7.1 : Relay access denied” error.
