This guide describes the procedure for upgrading Percona XtraDB Cluster version 5.6 to the latest version 5.7 without downtime (rolling upgrade). This means that replication between nodes will continue during the upgrade.
Rolling upgrade from earlier versions to 5.7 is not supported. If you are running Percona XtraDB Cluster version 5.5, it is recommended to shut down all nodes, then remove and re-create the cluster from scratch. Alternatively, you can perform a rolling upgrade from PXC 5.5 to 5.6, and then follow the current procedure to upgrade from 5.6 to 5.7.
The following documents contain details about relevant changes in the 5.7 series of MySQL and Percona Server. Make sure you deal with any incompatible features and variables mentioned in these documents when upgrading to Percona XtraDB Cluster 5.7.
To upgrade the cluster, follow these steps for each node:
Make sure that all nodes are synchronized.
$ sudo service mysql stop
Remove existing Percona XtraDB Cluster and Percona XtraBackup packages, then install Percona XtraDB Cluster version 5.7 packages. For more information, see Installing Percona XtraDB Cluster.
For example, if you have Percona software repositories configured, you might use the following commands:
On CentOS or RHEL:
$ sudo yum remove percona-xtrabackup* Percona-XtraDB-Cluster* $ sudo yum install Percona-XtraDB-Cluster-57
On Debian or Ubuntu:
$ sudo apt-get remove percona-xtrabackup* percona-xtradb-cluster* $ sudo apt-get install percona-xtradb-cluster-57
In case of Debian or Ubuntu,
mysql service starts automatically after install.
Stop the service:
$ sudo service mysql stop
grastate.dat, so that you can restore it
if it is corrupted or zeroed out due to network issue.
Start the node outside the cluster
by setting the
wsrep_provider variable to
sudo mysqld --skip-grant-tables --user=mysql --wsrep-provider='none'
As of Percona XtraDB Cluster 5.7.6, the
is not required.
Open another session and run
When the upgrade is done, stop the
You can either run
sudo kill on the
mysqld process ID,
sudo mysqladmin shutdown with the MySQL root user credentials.
On CentOS, the
my.cnf configuration file
is renamed to
Make sure to rename it back
before joining the upgraded node back to the cluster.
Now you can join the upgraded node back to the cluster.
In most cases, starting the
should run the node with your previous configuration:
$ sudo service mysql start
For more information, see Adding Nodes to Cluster.
As of version 5.7, Percona XtraDB Cluster runs with PXC Strict Mode enabled by default. This will deny any unsupported operations and may halt the server upon encountering a failed validation.
If you are not sure, it is recommended to first start the node
pxc_strict_mode variable set to
$ sudo mysqld --pxc-strict-mode=PERMISSIVE
After you check the log for any experimental or unsupported features
and fix any encountered incompatibilities,
you can set the variable back to
ENFORCING at run time:
mysql> SET pxc_strict_mode=ENFORCING;
Repeat this procedure for the next node in the cluster until you upgrade all nodes.
For general inquiries, please send us your question and someone will contact you.