Need to migrate your e-mails to a new server? Free and paid versions of our online tool available.
Hero Image

Add a Node to Percona XtraDB Cluster on Arch Linux

Add a Node to Percona XtraDB Cluster on Arch Linux

Prerequisites

  • Cluster bootstrapped and running
  • PXC installed on this node
  • Ports 3306, 4444, 4567, 4568 open

Configure this node (/etc/mysql/mysql.conf.d/mysqld.cnf, example Node 2)

[mysqld]
server-id            = 2
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
binlog_format        = ROW

Start MySQL (do NOT bootstrap)

systemctl start mysql

SST will copy data automatically. Monitor:

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

Verify on any node

SHOW STATUS LIKE 'wsrep_cluster_size';       -- increments per node
SHOW STATUS LIKE 'wsrep_incoming_addresses';
SHOW STATUS LIKE 'wsrep_local_state_comment'; -- Synced