If you want to install Galera Cluster, proceed as follows:
Note
In the examples below, MySQL authentication options are omitted for brevity.
Note
If you want to create a more sophisticated setup right at the beginning, see chapter Configuring Galera Cluster for MySQL.
This chapter describes how to install Galera Cluster on Debian and Debian-derived distributions.
Upgrade from mysql-server-5.0 to mysql-wsrep is not supported. Upgrade to mysql-server-5.5.
If you are installing over an existing MySQL installation, mysql-server-wsrep will conflict with the mysql-server-5.5 package. Remove the package as follows:
$ sudo apt-get remove mysql-server-5.5 mysql-server-core-5.5
The mysql-server-wsrep package requires packages psmisc and mysql-client-5.1.47 (or later). The MySQL 5.1 packages can be found in backports repositories. For more information on configuring and using Debian or Ubuntu backports, see:
For example, the installation of the required packages on Debian Lenny proceeds as follows:
$ sudo apt-get install psmisc
$ sudo apt-get -t lenny-backports install mysql-client-5.1
To install Galera Cluster, proceed as follows:
Install the write set replication patches:
$ sudo dpkg -i <mysql-server-wsrep DEB>
Configure the write set replication patches to use the Galera Replication Plugin as a wsrep provider:
wsrep_provider=/usr/lib/galera/libgalera_smm.so
Start the MySQL server.
This chapter describes how to install Galera Cluster on CentOS and similar RPM-based distributions.
If you are migrating from an existing MySQL installation, there are two options:
If you’re already using official MySQL-server-community 5.5.x RPM from Oracle:
# rpm -e mysql-server
If you are upgrading from the stock mysql-5.0.77 on CentOS:
Make sure that the following packages are not installed:
# rpm --nodeps --allmatches -e mysql-server mysql-test mysql-bench
Install the official MySQL-shared-compat-5.5.x from http://dev.mysql.com/downloads/mysql/5.1.html
To install Galera Cluster, proceed as follows:
Install the write set replication patches:
# rpm -Uvh <MySQL-server-wsrep RPM>
Configure the write set replication patches to use the Galera Replication Plugin as a wsrep provider:
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
Start the MySQL server.
Note
If the installation fails due to missing dependencies, install the missing packages (for example, yum install perl-DBI) and retry.
Install also the following additional packages (if not yet installed):
If you’re upgrading a previous MySQL installation, upgrade the system tables as follows:
See the MySQL documentation in case of errors. The errors are usually uncritical and can be ignored unless specific functionality is needed.