Hero Image

Add a Node to Percona XtraDB Cluster on OpenBSD 7.5

Add a Node to Percona XtraDB Cluster on OpenBSD 7.5

Prerequisites

  • Cluster bootstrapped and Node 1 running
  • PXC installed on this new node (Node 2 / Node 3)
  • Firewall ports 3306, 4444, 4567, 4568 open

Step 1 – Configure the new node

Edit /etc/mysql/mysql.conf.d/mysqld.cnf on the new node (example for Node 2):

[mysqld]
server-id            = 2
datadir              = /var/lib/mysql

wsrep_on             = ON
wsrep_provider       = /usr/lib64/galera4/libgalera_smm.so

wsrep_cluster_name   = "pxc_cluster"
wsrep_cluster_address= "gcomm://192.168.1.10,192.168.1.11,192.168.1.12"

wsrep_node_address   = "192.168.1.11"
wsrep_node_name      = "node2"

wsrep_sst_method     = xtrabackup-v2
wsrep_sst_auth       = sstuser:SSTpass!

innodb_autoinc_lock_mode = 2
default_storage_engine   = InnoDB
binlog_format            = ROW

Step 2 – Start MySQL (do NOT bootstrap)

systemctl start mysql

MySQL will detect the cluster, initiate SST from an existing node, and copy the full dataset automatically.

Monitor the SST progress:

tail -f /var/log/mysql/mysqld.log | grep -E 'SST|wsrep'

Step 3 – Verify the node joined

On any cluster node:

SHOW STATUS LIKE 'wsrep_cluster_size';
-- Should increment for each node that joins
SHOW STATUS LIKE 'wsrep_incoming_addresses';

Step 4 – Health check

SHOW STATUS LIKE 'wsrep_local_state_comment';
-- Expected: Synced