Installing Percona XtraDB Cluster from Binaries¶
Ready-to-use binaries are available from the Percona XtraDB Cluster download page, including:
RPM
packages for RHEL 5 and RHEL 6- Debian packages
- Generic
.tar.gz
packages
Using Percona Software Repositories¶
Percona provides repositories for yum (RPM
packages for Red Hat, CentOS and Amazon Linux AMI) and apt (.deb
packages for Ubuntu and Debian) for software such as Percona Server, XtraDB, XtraBackup, and Percona Toolkit. This makes it easy to install and update your software and its dependencies through your operating system’s package manager.
This is the recommend way of installing where possible.
YUM
-Based Systems¶
Once the repository is set up, use the following commands:
$ yum install Percona-XtraDB-Cluster-55
More detailed example of the Percona XtraDB Cluster installation and configuration can be seen in Installing Percona XtraDB Cluster on CentOS tutorial.
Note
In CentOS 5 mysql
package (a dependency of perl-DBD-MySQL
for libmysqlclient.so.15
) conflicts with Percona-XtraDB-Cluster-client-55.x86_64
package. To avoid this, install Percona-Server-shared-compat-51
first and then proceed to install Percona XtraDB Cluster with yum install Percona-XtraDB-Cluster-55
. Also, in case, mysql
package was installed, you will need to remove the it before installing Percona XtraDB Cluster as mentioned before.
DEB
-Based Systems¶
Once the repository is set up, use the following commands:
$ sudo apt-get install percona-xtradb-cluster-55
Note
For Ubuntu 14.04 (Trusty) percona-xtradb-cluster-galera-2.x
will have to be specified with the meta package so the installation command should look like:
$ sudo apt-get install percona-xtradb-cluster-55 percona-xtradb-cluster-galera-2.x
More detailed example of the Percona XtraDB Cluster installation and configuration can be seen in Installing Percona XtraDB Cluster on Ubuntu tutorial.
Prerequisites¶
In order for Percona XtraDB Cluster to work correctly firewall has to be set up to allow connections on the following ports: 3306, 4444, 4567 and 4568. Percona XtraDB Cluster currently doesn’t work with SELinux
or apparmor
so they should be disabled, otherwise individual nodes won’t be able to communicate and form the cluster.
Initial configuration¶
In order to start using the Percona XtraDB Cluster, following options are needed in the MySQL configuration file my.cnf
:
[mysqld]
wsrep_provider — a path to Galera library.
wsrep_cluster_address — Cluster connection URL containing the IPs of other nodes in the cluster
wsrep_sst_method - method used for the state snapshot transfer
binlog_format=ROW - In order for Galera to work correctly binlog format should be ROW
default_storage_engine=InnoDB - MyISAM storage engine has only experimental support
innodb_autoinc_lock_mode=2 - This changes how InnoDB autoincrement locks are managed
Additional parameters to specify:
wsrep_sst_auth=user:password
If any other State Snapshot Transfer method beside the rsync is specified in the wsrep_sst_method
, credentials for SST need to be specified.
Example:
wsrep_provider=/usr/lib64/libgalera_smm.so
wsrep_cluster_address=gcomm://10.11.12.206
wsrep_slave_threads=8
wsrep_sst_method=rsync
binlog_format=ROW
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2
Detailed list of variables can be found in Index of wsrep system variables and Index of wsrep status variables.
Contact Us
For free technical help, visit the Percona Community Forum.To report bugs or submit feature requests, open a JIRA ticket.
For paid support and managed or professional services, contact Percona Sales.