Question
How to upgrade MySQL 5.5 to 5.6/5.7 or MariaDB 5.5 to 10.X on Linux?
Answer
Plesk UI
Manual procedure
In Plesk Obsidian 18.0.60 we have released our new tool to upgrade MariaDB to a supported LTS branch via Plesk User Interface. It checks configuration, performs DB backup, configures MariaDB package repositories, performs the upgrade, and runs necessary post-upgrade actions
Note: this automatic tool is not available on CloudLinux. For this operating system proceed to the the Manual procedure.
Note: the automatic upgrade method currently supports MariaDB upgrade up to 10.11 version. In order to upgrade MariaDB to 11.4 version, please follow the steps from the Manual Procedure section.
The feature is being gradually rolled out to Plesk servers around the world. If you do not see the Upgrade Now button, you can enable the feature manually by adding the following lines to the panel.ini file. How to edit Plesk panel.ini:
[databaseManagement]
features.canBeUpgraded = 1
- Login to Plesk UI as admin.
- Go to Tools & Settings > Database Servers page:
- Click "Upgrade now" button.
- Feedback about this feature can be left using the following link.
This section provides manual instructions for upgrading MySQL 5.5 to 5.6/5.7 and MariaDB 5.5 to 10.0/10.1/10.2/10.3/10.4/10.5/10.6/10.11 on Linux.
Note: Upgrade can be performed in a command-line interface with the instructions below at your own risk. This task is supposed to be performed by a system administrator.
If you are not familiar with Linux system administering and would like our professionals to handle this task on your behalf, contact Professional Services team at https://www.plesk.com/professional-services/.
To find out your Linux distribution, run:
# plesk version | grep "OS version"
Or:
# cat /etc/*-release
Warning: MariaDB 10.11 is supported starting from Plesk Obsidian 18.0.52. MariaDB 10.4 and later versions are supported starting from Plesk Obsidian 18.0.30. Previous versions (Onyx and older) do not support MariaDB starting from 10.3 and there are no plans to implement it currently.
Warning:
Direct upgrade from MySQL 5.1 to MySQL 5.6/5.7 will break tables structure. The instructions for upgrading MySQL from 5.1 to 5.5 on Linux are available here: How to upgrade MySQL from 5.1 to 5.5 on Linux
Warning:
Direct upgrade from MariaDB 5.5 or 5.7 to MariaDB 10.6 or later versions is not possible.
You should first upgrade MariaDB 5.5. or 5.7 to any MariaDB from 10.3 to 10.5, and then perform an update to MariaDB 10.6 or later
It is strongly recommended to create a server snapshot (full backup) before upgrading. Perform MySQL/MariaDB upgrade at your own risk.
Before starting a MySQL/MariaDB upgrade, stop the WatchDog service if it is used on a server. Check its status with the service watchdog status
command.
Note: MySQL/MariaDB will not be upgraded on CentOS/RHEL-based operating systems if it was installed from the Webtatic Yum repository:
# rpm -qa | grep -i mysql
mysql55w-server-5.5.57-1.w6.x86_64
To start an upgrade of MySQL/MariaDB, connect to a server via SSH as root/superuser and follow the instructions for your operating system:
Plesk on CentOS 8/AlmaLinux 8/AlmaLinux 9
By default, CentOS 8 is shipped with MariaDB 10.3.
-
For security reasons, create a database dump of all databases with the following command:
# MYSQL_PWD=`cat…