Product Solutions Support
Try MemSQL

Upgrading MemSQL

This topic describes how to upgrade MemSQL from an earlier version.

Warning

To upgrade MemSQL from versions 3.2 and earlier, see Upgrading MemSQL from 3.2 and earlier. This page describes how to upgrade MemSQL from versions 4.0 and later. This page assumes the MemSQL cluster is managed by MemSQL Ops.

Prior to upgrading:

Step 1: Upgrade MemSQL Ops

Run:

$ memsql-ops agent-upgrade

Step 2: Upgrade MemSQL

There are two approaches to upgrading a MemSQL cluster:

Option 1: Offline Cluster Upgrade

The simplest upgrade process is an offline cluster upgrade. This will upgrade all nodes at the same time, shutting down the entire cluster for the duration of the upgrade.

Execute the following command to start an offline upgrade:

$ memsql-ops memsql-upgrade [--version <VERSION>]
Info

This command will shut down the entire cluster for the duration of the upgrade. For more information, see the full documentation for the command MEMSQL-UPGRADE.

It’s important to understand that an offline upgrade installs a new version of MemSQL to a different path instead of overriding the existing installation. Specifically, MemSQL Ops appends “-1” to the end of the installation directory name, for example: master-3306-1 instead of master-3306.

The older installation directory is deleted after after a successful upgrade, leaving just a master-3306-1 path. The next time the node restarts, the master-3306-1 directory will be renamed to master-3306.

By using a different directory to upgrade, the installation process can be safely rolled back, since the upgrade process does not modify any of the files in the older version’s directory.

Any custom scripts using a hardcoded path to the MemSQL installation directory should be updated to reflect the change of the installation directory caused by the upgrade, or ideally use the memsql-path command instead of a hardcoded path. For more information, see MEMSQL-PATH.

Option 2: Online, incremental cluster upgrade (High Availability clusters only)

If the cluster is running with High Availability, you also have the option to perform an online, incremental cluster upgrade, which maintains cluster availability throughout the upgrade process. Follow the instructions in Online Upgrade.

Was this article useful?