Plesk Update Mariadb manually

Erstellt am 14.04.2025 um 11:49:06 Uhr | muellda

Aktualisiert am 14.04.2025 um 11:49:06 Uhr | muellda

Plesk on Ubuntu 20.04/Ubuntu 22.04

By default, Ubuntu 20.04 is shipped with MariaDB 10.3 and Ubuntu 22.04 with MariaDB 10.6.

  1. For security reasons, create a database dump of all databases with the following command:

MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin –verbose –all-databases –routines –triggers > /tmp/all-databases.sql

Stop MariaDB:

  1. service mariadb stop

Here is an example for MariaDB 10.4:

Warning: MariaDB 10.4 and later versions are supported since 18.0.30, make sure the latest Plesk version is installed.

  1. Install repositories:

apt-get install software-properties-common

apt-key adv –fetch-keys ‘https://mariadb.org/mariadb_release_signing_key.asc’

curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash -s — –mariadb-server-version=10.4

Create a backup of all MySQL data:

cp -v -a /var/lib/mysql/ /var/lib/mysql_backup

Start an upgrade with the following command. Leave all fields empty when asked for a ‘root’ user password:

apt-get update

apt-get install mariadb-server

Adjust the my.cnf configuration file to match the new requirements:

sed -i ‘s/bind-address = ::ffff:127.0.0.1/bind-address = 127.0.0.1/g’ /etc/mysql/my.cnf

Start the MariaDB service:

service mariadb start

Upgrade MySQL/MariaDB databases:

MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin

Restart mysql service:

service mariadb restart

Execute the following commands to update package version inside Plesk:plesk bin service_node –update local

  1. plesk sbin packagemng -sdf

More information available in MySQL documentation at http://dev.mysql.com/.