Hero Image

Install Percona XtraDB Cluster on AlmaLinux 9

Install Percona XtraDB Cluster (PXC) on AlmaLinux 9

Percona XtraDB Cluster provides multi-master MySQL replication using the Galera library with zero data loss.

Step 1 – Install PXC

# Add Percona repository
dnf install -y https://repo.percona.com/yum/percona-release-latest.noarch.rpm
percona-release enable-only pxc-80 release
dnf install -y percona-xtradb-cluster

Step 2 – Secure initial installation

# Get the temporary root password
grep 'temporary password' /var/log/mysqld.log

# Connect and change password
mysql -u root -p
ALTER USER 'root'@'localhost' IDENTIFIED BY 'StrongRoot123!';

Start service:

systemctl enable --now mysql

Step 3 – Configure node 1 (bootstrap node)

See Bootstrap a PXC Cluster on AlmaLinux 9.

Step 4 – Add additional nodes

See Add a Node to PXC Cluster on AlmaLinux 9.

Architecture overview

     ┌──────────┐        ┌──────────┐        ┌──────────┐
     │  Node 1  │◄──────►│  Node 2  │◄──────►│  Node 3  │
     │ Primary  │        │          │        │          │
     └──────────┘        └──────────┘        └──────────┘
          All writes replicated synchronously (wsrep)