Upgrading Between Minor Versions with Galera Cluster
Performing a Rolling Upgrade
The following steps can be used to perform a rolling upgrade between minor versions of MariaDB (for example from MariaDB 10.3.12 to MariaDB 10.3.13) when Galera Cluster is being used. In a rolling upgrade, each node is upgraded individually, so the cluster is always operational. There is no downtime from the application's perspective.
Before you upgrade, it would be best to take a backup of your database. This is always a good idea to do before an upgrade. We would recommend Mariabackup.
For each node, perform the following steps:
- Stop MariaDB.
- Install the new version of MariaDB and the Galera wsrep provider.
- On Debian, Ubuntu, and other similar Linux distributions, see Installing MariaDB Packages with APT for more information.
- On RHEL, CentOS, Fedora, and other similar Linux distributions, see Installing MariaDB Packages with YUM for more information.
- On SLES, OpenSUSE, and other similar Linux distributions, see Installing MariaDB Packages with ZYpp for more information.
- Make any desired changes to configuration options in option files, such as
my.cnf
. This includes removing any system variables or options that are no longer supported. - Start MariaDB.
- Run mariadb-upgrade ( the
--skip-write-binlog
option is important in this step. While it is not necessary to specify it on the command-line because it is on by default, specifying it can help as a reminder that it is needed)mariadb-upgrade
does two things:- Ensures that the system tables in the
mysql
database are fully compatible with the new version. - Does a very quick check of all tables and marks them as compatible with the new version of MariaDB .
- Ensures that the system tables in the
When this process is done for one node, move onto the next node.
Note that when upgrading the Galera wsrep provider, sometimes the Galera protocol version can change. The Galera wsrep provider should not start using the new protocol version until all cluster nodes have been upgraded to the new version, so this is not generally an issue during a rolling upgrade. However, this can cause issues if you restart a non-upgraded node in a cluster where the rest of the nodes have been upgraded.