Percona XtraDB Cluster 5.6 in 3 nodes

Percona XtraDB Cluster (PXC) is a high availability and high scalability, solution for MySQL clustering. Percona Server, Percona Xtrabackup and Galera library for high availability integrated together as PXC. It provides synchronous, multi-master, and parallel replication. All the nodes of this cluster are ready to serve read/write request simultaneously.

Percona XtraDB Cluster 5.6 in 3 nodes – Ubuntu server

Node1 = 192.168.31.150 | /etc/mysql/my.cnf

[mysqld]
datadir = /var/lib/mysql
 
binlog_format = ROW
wsrep_cluster_name = PXC
wsrep_cluster_address = gcomm://192.168.31.150,192.168.31.151,192.168.31.152
wsrep_node_address = 192.168.31.150
wsrep_provider = /usr/lib/libgalera_smm.so
wsrep_sst_method = rsync
innodb_locks_unsafe_for_binlog = 1
innodb_autoinc_lock_mode = 2
default_storage_engine=InnoDB

Node2 = 192.168.31.151 | /etc/mysql/my.cnf

[mysqld]
datadir = /var/lib/mysql
 
binlog_format = ROW
wsrep_cluster_name = PXC
wsrep_cluster_address = gcomm://192.168.31.150,192.168.31.151,192.168.31.152
wsrep_node_address = 192.168.31.151
wsrep_provider = /usr/lib/libgalera_smm.so
wsrep_sst_method = rsync
innodb_locks_unsafe_for_binlog = 1
innodb_autoinc_lock_mode = 2
default_storage_engine=InnoDB

Node3 = 192.168.31.152 | /etc/mysql/my.cnf

[mysqld]
datadir = /var/lib/mysql
 
binlog_format = ROW
wsrep_cluster_name = PXC
wsrep_cluster_address = gcomm://192.168.31.150,192.168.31.151,192.168.31.152
wsrep_node_address = 192.168.31.152
wsrep_provider = /usr/lib/libgalera_smm.so
wsrep_sst_method = rsync
innodb_locks_unsafe_for_binlog = 1
innodb_autoinc_lock_mode = 2
default_storage_engine=InnoDB