Applicable to:
- Plesk for Linux
Question
How to upgrade MySQL 5.5 to 5.6/5.7 or MariaDB 5.5 to 10.X on Linux?
Answer
This article provides 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 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.4 and 10.5 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.
Warnings:
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
It is strongly recommended to create a server snapshot (full backup) before upgrading. Perform MySQL upgrade at your own risk.
Before starting a MySQL upgrade, stop the WatchDog service if it is used on a server. Check its status with the service watchdog status
command.
Note: MySQL 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:
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 /etc/psa/.psa.shadow` mysqldump -u admin --verbose --all-databases --routines --triggers > /tmp/all-databases.sql
-
Stop MariaDB:
# service mariadb stop
-
Remove additional package conflicting with 10.4 version:
# yum remove mariadb-gssapi-server
-
For security reasons, copy the database directory in a separate folder:
# cp -v -a /var/lib/mysql/ /var/lib/mysql_backup
-
Configure MariaDB repository: open the Setting MariaDB repositories page, select your OS distro, release, and desired MariaDB version. Once done, the configuration that should be added to the
/etc/yum.repos.d/MariaDB.repo
file will appear.Warning: MariaDB 10.4 and 10.5 are supported since 18.0.30, make sure the latest Plesk version is installed.
Here is an example for MariaDB 10.4:
5.1. Open/create the MariaDB.repo file in any text editor. In this example, we are using the vi editor:
# vi /etc/yum.repos.d/MariaDB.repo
5.2. Add the content below to the file:
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.4/centos8-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
priority=1
module_hotfixes=1The configuration item
module_hotfixes=1
is a workaround for what MariaDB told is a dnf bug. See MDEV-20673 for more details5.3. Save the changes and close the file.
-
Reset all the cache:
# yum clean all
-
Start an upgrade of MariaDB to 10.4:
# yum install MariaDB-server galera-4 MariaDB-client MariaDB-shared MariaDB-backup MariaDB-common
-
Once the upgrade is finished, start MariaDB:
# systemctl restart mariadb
-
Upgrade MySQL databases:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin
-
Restart mariadb service:
# systemctl restart mariadb
-
Execute this command to update the package version inside Plesk:
# plesk sbin packagemng -sdf
-
Restore SeLinux context:
# restorecon -v /var/lib/mysql/*
By default, CentOS 7 is shipped with MariaDB 5.5. MariaDB 10.x version is a drop-in replacement for MySQL 5.5-5.7.
Automatic method
Note: The script below is applicable only for upgrading default MariaDB 5.5 to the latest MariaDB version, for other cases apply the steps from the Manual Method section. Make sure Obsidian 18.0.30 or later is installed on the server.
-
Download the attached script and provide it with executable rights:
# wget https://support.plesk.com/hc/en-us/article_attachments/4584125667858/c7-mariadb-10.5-upgrade.sh && chmod +x c7-mariadb-10.5-upgrade.sh
-
Execute the script via CLI:
# ./c7-mariadb-10.5-upgrade.sh
Manual Method
-
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:
# service mariadb stop
-
Remove additional
mariadb-bench
package if installed:# rpm -e --nodeps mariadb-bench
-
For security reasons, copy the database directory in a separate folder:
# cp -v -a /var/lib/mysql/ /var/lib/mysql_backup
-
Check if the mysql-server package is already installed:
# rpm -q --whatprovides mysql-server
If it is installed and the command above gives output, remove using the following command:
# rpm -e --nodeps `rpm -q --whatprovides mysql-server`
-
Configure MariaDB repository: open the Setting MariaDB repositories page, select your OS distro, release, and desired MariaDB version. Once done, the configuration that should be added to the /etc/yum.repos.d/MariaDB.repo file will appear.
Warning: MariaDB 10.4 and 10.5 are supported since 18.0.30, make sure the latest Plesk version is installed.
Here is an example for MariaDB 10.5:
6.1. Open/create the MariaDB.repo file in any text editor. In this example, we are using the vi editor:
# vi /etc/yum.repos.d/MariaDB.repo
6.2. Add the content below to the file:
CONFIG_TEXT: [mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.5/centos7-amd64
gpgkey = https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=16.3. Save the changes and close the file.
-
Reset all the cache:
# yum clean all
-
Start an upgrade of MariaDB:
# yum install MariaDB-client MariaDB-server MariaDB-compat MariaDB-shared
-
Once the upgrade is finished, start MariaDB:
# systemctl restart mariadb
OR
# systemctl restart mysql
-
Upgrade MySQL databases:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin
-
Restart mysql service:
# systemctl restart mariadb
OR
# systemctl restart mysql
-
Execute this command to update the package version inside Plesk:
# plesk sbin packagemng -sdf
Note: After an upgrade, there may appear 'mysql' init script. It should be removed to avoid conflicts with MariaDB service. The same commands can be used to fix already existing conflict:
# systemctl stop mysql; killall mysqld # to stop the incorrect service if it is started
# rm /etc/init.d/mysql && systemctl daemon-reload # to remove the incorrect service script and reload systemctl configuration
# systemctl start mariadb # to start MariaDB if not started
# systemctl enable mariadb # to make sure that MariaDB will start after the server reboot automatically
-
Create a backup 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 the MySQL service:
# service mysqld stop
-
Copy a databases directory in a separate folder like this (for backup purposes also):
# cp -v -a /var/lib/mysql/ /var/lib/mysql_backup
-
Start the MySQL service:
# service mysqld start
-
Ensure that
[mysqlclient]
repository is enabled in/etc/yum.repos.d/cl-mysql.repo
and the below command displays similar output:# yum repolist enabled | grep mysqlclient
Repository extras is listed more than once in the configuration
mysqclient/7/x86_64 mysqlclient 7 -
Select MySQL/MariaDB version to install:
Note: The following command does not work if
governor-mysql
package is not installed. In such case, install it:
# yum install governor-mysql# /usr/share/lve/dbgovernor/mysqlgovernor.py --mysql-version=XXXXX
Note: Where 'XXXXX' has to be substituted with one of the following:
mariadb100
for MariaDB v10.0mariadb101
for MariaDB v10.1mariadb102
for MariaDB v10.2mariadb103
for MariaDB v10.3mariadb104
for MariaDB v10.4mariadb105
for MariaDB v10.5mysql55
for MySQL v5.5mysql56
for MySQL v5.6mysql57
for MySQL v5.7 -
Install selected previously MariaDB engine:
# /usr/share/lve/dbgovernor/mysqlgovernor.py --install
Warning: CloudLinux does not recommend to downgrade from MySQL v5.6, MariaDB 10.x
-
Restart MySQL:
# service mysql restart
-
Upgrade MySQL databases:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin
-
Restart MySQL:
# service mysql restart
-
Execute the following commands to update package version inside Plesk:
# plesk bin service_node --update local
# plesk sbin packagemng -sdf
Debian 9 is basically shipped with MariaDB. MariaDB 10.x version is a drop-in replacement for MySQL 5.5/5.6/5.7
- Backup all existing databases using the KB article How to backup/restore a Plesk database dump and follow instructions on MariaDB site to update it:
Example for MariaDB 10.2
-
Install MariaDB:
1.1. Stop the MariaDB service:
# service mariadb stop
# curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash -s -- --mariadb-server-version=mariadb-10.2
# apt install mariadb-server-10.2If the installation fails with unmet dependencies:
CONFIG_TEXT: dpkg: mariadb-server-10.1: dependency problems, but removing anyway as you requested:
plesk-mysql-server depends on virtual-mysql-server | mysql-server; however:
Package virtual-mysql-server is not installed.
Package mariadb-server-10.1 which provides virtual-mysql-server is to be removed.
Package mariadb-server-10.2 which provides virtual-mysql-server is not installed.
Package mysql-server is not installed.
<...>
The following packages have unmet dependencies:
mariadb-server-10.2 : Depends: mariadb-client-10.2 (>= 10.2.19+maria~stretch) but it is not going to be installed
Depends: mariadb-server-core-10.2 (>= 10.2.19+maria~stretch) but it is not going to be installedRun the command below to correct them:
# apt --fix-broken install
-
Check MySQL version:
# mysql -V
mysql Ver 15.1 Distrib 10.2.19-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2 -
Start the MariaDB service:
# service mariadb start
Note: It may be already started
-
Upgrade MySQL 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
# plesk sbin packagemng -sdf
By default, Debian 10 is shipped with MariaDB 10.3.
-
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:
# service mariadb stop
Here is an example for MariaDB 10.4:
Warning: MariaDB 10.4 and 10.5 are supported since 18.0.30, make sure the latest Plesk version is installed.
-
Install repositories from Setting up MariaDB Repositories page:
Warning: Check the file "
/etc/apt/sources.list
" and the files inside directory "/etc/apt/sources.list.d/
" and disable (comment with#
at the beginning of the line) all MySQL repositories (e.g. MySQL 8 repository) to avoid installation of wrong MySQL versions by mistake.# apt-get install software-properties-common dirmngr apt-transport-https
# apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'
# add-apt-repository 'deb [arch=amd64,arm64,ppc64el] https://mirror.docker.ru/mariadb/repo/10.4/debian buster main'
For other MariaDB versions replace 10.4 with 10.5 in the repository path.
-
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
If the installation fails with unmet dependencies:
CONFIG_TEXT: plesk-mysql-server depends on virtual-mysql-server | mysql-server; however:
Package virtual-mysql-server is not installed.
Package mariadb-server-10.3 which provides virtual-mysql-server is to be removed.
Package mysql-server is not installed.
[...]
dpkg: error processing archive /var/cache/apt/archives/mariadb-server-10.4_1%3a10.4.14+maria~buster_amd64.deb (--unpack):
trying to overwrite '/usr/bin/my_print_defaults', which is also in package mariadb-server-core-10.3 1:10.3.22-0+deb10u1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/mariadb-server-10.4_1%3a10.4.14+maria~buster_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)OR
CONFIG_TEXT: The following packages have unmet dependencies:
mariadb-server : Depends: mariadb-server-10.4 (>= 1:10.4.14+maria~buster) but it is not going to be installed
plesk-mysql-server : PreDepends: virtual-mysql-server or
mysql-server but it is not installable
Depends: virtual-mysql-server or
mysql-server but it is not installableRun the command below to correct them:
# apt --fix-broken install
-
Start the MariaDB service:
# service mariadb start
-
Upgrade MySQL 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
# plesk sbin packagemng -sdf
Ubuntu 18.04 is shipped with MariaDB 10.1. MariaDB 10.x version is a drop-in replacement for MySQL 5.5-5.7. In order to upgrade MariaDB 10.1 to MariaDB 10.x, follow these steps:
-
Create a backup 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 the MariaDB service:
# service mariadb stop
Here is an example for MariaDB 10.2:
Warning: MariaDB 10.4 and 10.5 are supported since 18.0.30, make sure the latest Plesk version is installed.
-
Install repositories from Setting up MariaDB Repositories page:
Warning: Check the file "/etc/apt/sources.list" and the files inside directory "/etc/apt/sources.list.d/" and disable (comment with # at the beginning of the line) all MySQL repositories (e.g. MySQL 8 repository) to avoid installation of wrong MySQL versions by mistake.
# apt-get install software-properties-common
# apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'
# add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http://mirror.truenetwork.ru/mariadb/repo/10.2/ubuntu bionic main'
For other MariaDB versions replace 10.2 with 10.3, etc. in the repository path.
-
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
-
Start the MariaDB service:
# service mariadb start
-
Upgrade MySQL 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
# plesk sbin packagemng -sdf
By default, Ubuntu 20.04 is shipped with MariaDB 10.3.
-
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:
# service mariadb stop
Here is an example for MariaDB 10.4:
Warning: MariaDB 10.4 and 10.5 are supported since 18.0.30, make sure the latest Plesk version is installed.
-
Install repositories from Setting up MariaDB Repositories page:
Warning: Check the file "
/etc/apt/sources.list
" and the files inside directory "/etc/apt/sources.list.d/
" and disable (comment with#
at the beginning of the line) all MySQL repositories (e.g. MySQL 8 repository) to avoid installation of wrong MySQL versions by mistake.# apt-get install software-properties-common
# apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'
# add-apt-repository 'deb [arch=amd64,arm64,ppc64el,s390x] https://mirror.docker.ru/mariadb/repo/10.4/ubuntu focal main'
For other MariaDB versions replace 10.4 with 10.5 in the repository path.
-
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
-
Start the MariaDB service:
# service mariadb start
-
Upgrade MySQL 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
# plesk sbin packagemng -sdf
More information available in MySQL documentation at http://dev.mysql.com/.
Comments
224 comments
Hello Mark S.
You may try the solution from here (you will need to adapt it to Deb 10 instead of Deb 8): https://unix.stackexchange.com/questions/339563/upgrade-mariadb-10-0-29maria-1jessie-failed
In case this won't help, contact OS support.
Thank you for your answer. Unfortunately the described method in your link (adapted to Debian Buster) does not work either.
:-(
Hello Mark,
You may purchase an upgrade service from our Professional Services team:
https://www.plesk.com/professional-services/administrative-services/
This command is missing to make it work.
1°) Open the MariaDB configuration file
DEBIAN vi /etc/mysql/mariadb.conf.d/50-server.cnf
REDHAT vi /etc/my.cnf
2°) Add the line below
[mysqld]
section:plugin-load-add = auth_socket.so
SOURCE> https://support.plesk.com/hc/en-us/articles/360009592400-MariaDB-10-3-error-after-upgrade-Plugin-unix-socket-is-not-loaded
Is there any reason why this is not done in the course of a normal plesk update? I have 18.0 Obsidian installed - which supports MariaDb 10.3 natively - but this has never been updated since the first installation of the server.
As this also seems really verbose - is this still the recommended way for all versions? I mean why isn't it possible to upgrade this via Plesk Updates like any other 3rd party package?
Sorry - this becomes annoying.
Plesk writes that Moodle is a supported application - but today even a fresh install on a fresh system (Ubutu 18.04) is impossible. Again the famous non zero exit.
Again the mariaDB version is too old. That's why at the beginning of the week my former debian server became unusable for moodle. Since days I try and try THESE linux hacking rubbish that don't want to apply. Now I sit in front of my fresh Ubuntu system with the same missing Moodle in these remote corona days and waste day after day with this mariaDB shit!
Please: ONE BUTTON, ONE UPDATE as it should be for Plesk users! Six pages reading tricks with endless links to source of sources to sources - sorry, NO!
If Plesk supports Moodle I expect a real Plesk update without this not working hacks. Otherwise remove Moodle from the compatibility list. At the moment it neither be used nor installed. And that's the last thing I (and I guess a lot of others either) can need in these distancing days. Sorry for being a little harsh, but working help is needed urgently. And no: this is nothing for an additional purchasing of any Service. If the DB update will do as it should we would be done.
Thanks
I am upgrading MariaDB 5.5 to v10.3
What is the command to FIND if any additional packages like mariadb-bench are installed.
Hi @Vinod Vyas,
You need to find the command for a package manager that depends on your server OS. You may search in the internet for the proper command applicable for your OS as it is not managed by Plesk. For example, there are yum and rpm package managers used on Centos, CloudLinux or Red Hat OS and one of available commands would be the following:
# rpm -qa | grep mariadb
Hello Philipp Lang
Thank you for the feedback. By design, MariaDB/MySQL server is installed from OS repositories unless custom isn't specified. 10.3 Maybe be installed with new Plesk Obsidian in case correct repos are set up on the server.
> is this still the recommended way for all versions?
Yes, indeed, this is the only way to have MariaDB/MySQL. As long as you follow the process for your OS step by step, the process should go smoothly.
Feel free to vote for this feature suggestion: https://plesk.uservoice.com/forums/184549-feature-suggestions/suggestions/6315581-multiple-mysql-versions-configureable-over-panel
Hello Michael Gellner
Sorry for the long response and thank you for the feedback.
To be honest, on your side I would feel the same.
However, the only way to satisfy the requirements is to do the steps from this article manually.
Usually, the process goes smoothly.
If now you're stuck with some particular error, let us know, maybe some Pleskian already has a solution.
Hello SamParis
Thank you for noticing.
According to https://jira.mariadb.org/browse/MDEV-14367 this happens when updating from MariaDB 10.1.
However, this still may be useful for other Pleskians.
mariadb105 is missing in install-mysql ...
# /usr/share/lve/dbgovernor/mysqlgovernor.py --mysql-version=mariadb105
install-mysql: error: argument --mysql-version: invalid choice: 'mariadb105' (choose from 'auto', 'mysql51', 'mysql55', 'mysql56', 'mysql57', 'mysql80', 'mariadb55', 'mariadb100', 'mariadb101', 'mariadb102', 'mariadb103', 'mariadb104', 'percona56')
Richard Anthony Secor Hi Richard, you are right. MariaDB 10.5 is not yet added to mysql-governor by CloudLinux .
Hello Plesk Support Team,
could you change this line in your documentation:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin --all-databases --routines --triggers > /tmp/all-databases.sql
to
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin --verbose --all-databases --routines --triggers > /tmp/all-databases.sql
it shows what is happening. Better output better for large Databases doesn't seems to be frozen.
Hello,
I am trying to upgrade to mariadb 10.4 from Plesk Obsidian 18.0.30 on debian 9 and after adding the command # curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash -s -- --mariadb-server-version=mariadb-10.4 get the following error: curl: (23) Failed writing body (395 != 1369)
What could this be due to?
Thank you
Andreu Hi! on my debian 9 server it works fine. Which curl version are you running? My test server is running:
# curl -V
curl 7.52.1
Please open a support ticket with us so we can take a look.
Jan Bludau Done :)
Hi, it's only a minor point, but can the guidance notes for Ubuntu 18.04, which appear to be out of date (image) be corrected / updated? MariaDB 10.3.* is supported from Plesk Obsidian (any release) and MariaDB 10.4.* / 10.5.* are both now supported from Obsidian 18.0.30 release onwards. In addition, Ubuntu 20.04 OS is completely missing, yet that is now supported from Obsidian 18.0.29 release onwards too.
Hello Learning Curve
Thank you for the comment.
The article was updated. Let us know in case you have something to add.
Hi amazing Plesk support,
in the past all upgrades were successful. This time it seems also, but in the end of installation MariaDB 10.5.5 to 10.3.24 on Ubuntu 18.04.5 and Plesk Obsidian 18.0.30 #1 I got the info that the installation failed. I went on for the last three steps by restarting and updating package version in Plesk. Then I looked in Plesk and the old version 10.3.x was shown. I performed the usual step clicking on localhost and simply clicking on OK on the next side.
Then the new 10.5.5 version of MariaDB was shown and all websites/databases are working.
But the fatal error already makes me unsure. Is everything okay now, or not.
Greets and thanks for the tutorial.
root@server:~# service mariadb start
root@server:~# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin
Phase 1/7: Checking and upgrading mysql database
Processing databases
mysql
mysql.column_stats OK
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.global_priv OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.roles_mapping OK
mysql.servers OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.transaction_registry OK
Phase 2/7: Installing used storage engines... Skipped
Phase 3/7: Fixing views
mysql.user
Error : The user specified as a definer ('mariadb.sys'@'localhost') does not exist
error : Corrupt
Phase 4/7: Running 'mysql_fix_privilege_tables'
ERROR 1449 (HY000) at line 7: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1449 (HY000) at line 16: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1449 (HY000) at line 59: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1449 (HY000) at line 68: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
ERROR 1449 (HY000) at line 86: The user specified as a definer ('mariadb.sys'@'localhost') does not exist
FATAL ERROR: Upgrade failed
root@server:~# service mariadb restart
root@server:~# plesk bin service_node --update local
The service node 'local' was successfully updated.
root@server:~# plesk sbin packagemng -sdf
root@server:~#
root@server:~# aptitude upgrade
The following packages will be upgraded:
libmariadb3 mysql-common
2 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 153 kB of archives. After unpacking 3,072 B will be used.
Do you want to continue? [Y/n/?] Y
Get: 1 http://mirror.truenetwork.ru/mariadb/repo/10.5/ubuntu bionic/main amd64 libmariadb3 amd64 1:10.5.5+maria~bionic [149 kB]
Get: 2 http://mirror.truenetwork.ru/mariadb/repo/10.5/ubuntu bionic/main ppc64el mysql-common all 1:10.5.5+maria~bionic [3,264 B]
Fetched 153 kB in 1s (267 kB/s)
(Reading database ... 220626 files and directories currently installed.)
Preparing to unpack .../libmariadb3_1%3a10.5.5+maria~bionic_amd64.deb ...
Unpacking libmariadb3:amd64 (1:10.5.5+maria~bionic) over (1:10.3.24+maria~bionic) ...
Preparing to unpack .../mysql-common_1%3a10.5.5+maria~bionic_all.deb ...
Unpacking mysql-common (1:10.5.5+maria~bionic) over (1:10.3.24+maria~bionic) ...
Setting up libmariadb3:amd64 (1:10.5.5+maria~bionic) ...
Setting up mysql-common (1:10.5.5+maria~bionic) ...
Processing triggers for mariadb-server-10.5 (1:10.5.5+maria~bionic) ...
Processing triggers for libc-bin (2.27-3ubuntu1.2) ...
Current status: 0 (-2) upgradable.
root@server:~#
root@server:~# service mariadb status
● (<green) mariadb.service - MariaDB 10.5.5 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf, override.conf
Active: active (running) since Tue 2020-09-22 22:49:35 CEST; 50min ago
Docs: man:mariadbd(8)
https://mariadb.com/kb/en/library/systemd/
Main PID: 22381 (mariadbd)
Status: "Taking your SQL requests now..."
Tasks: 22 (limit: 4915)
CGroup: /system.slice/mariadb.service
└─22381 /usr/sbin/mariadbd
Sep 22 22:49:33 server.example.com systemd[1]: Starting MariaDB 10.5.5 database server...
Sep 22 22:49:33 server.example.com mariadbd[22381]: 2020-09-22 22:49:33 0 [Note] /usr/sbin/mariadbd (mysqld 10.5.5-MariaDB-1:10.5.5+maria~bion
Sep 22 22:49:35 server.example.com systemd[1]: Started MariaDB 10.5.5 database server.
Sep 22 22:49:35 server.example.com /etc/mysql/debian-start[22410]: Upgrading MySQL tables if necessary.
Sep 22 22:49:35 server.example.com systemd-journald[529]: Suppressed 2385 messages from mariadb.service
Sep 22 22:49:35 server.example.com /etc/mysql/debian-start[22415]: /usr/bin/mysql_upgrade: the '--basedir' option is always ignored
Sep 22 22:49:35 server.example.com /etc/mysql/debian-start[22415]: Looking for 'mysql' as: /usr/bin/mysql
Sep 22 22:49:35 server.example.com /etc/mysql/debian-start[22415]: Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
Sep 22 22:49:35 server.example.com /etc/mysql/debian-start[22415]: This installation of MariaDB is already upgraded to 10.5.5-MariaDB, use --f
Sep 22 22:49:35 server.example.com /etc/mysql/debian-start[22423]: Checking for insecure root accounts.
lines 1-23/23 (END)
Hello Markus
MariaDB upgrade to 10.5 with Ubuntu 18 was not yet tested. Please note that MariaDB upgrade is system administrative task. You may want to contact MariaDB Community support or wait for the article to be updated with steps for Ubuntu 18 and upgrade to 10.5
Hello Ivan Postnikov
Thank you very much. That's already much clearer than it was previously. Additional comments are:
The warning about which Obsidian releases are suitable for which MariaDB releases is included in the Ubuntu 20.04 guide, but is missing from the Ubuntu 18.04 guide (image). It's therefore, still possible for somebody... using Ubuntu 18.04 to make a wrong assumption, as a result of that missing warning.
The Plesk Changelog implies, but does not actually state, that MariaDB 10.4.* / 10.5.* are both now supported for all OS, from the Obsidian 18.0.30 release onwards (image) although, this page, is then given as the link for more detailed guidance. Users should therefore, come here to check & verify their own setup / intentions in advance. That's very good, but users are users, so it's not guarenteed!
However, the last post from Anton Maslov then states "MariaDB upgrade to 10.5 with Ubuntu 18 was not yet tested" That's the ONLY reference for Ubuntu 18.04 users of this current status, anywhere on this page...i.e. That's not shown in the guide. This may also be the case for a MariaDB upgrade to 10.4.* for Ubuntu 18.04 users.? Nobody knows, because it's not (yet) clearly stated anywhere in any guidance notes & not all users will read this comments section first. Therefore, there is still an unstated risk at this stage.
FWIW, We currently use Ubuntu 18.04 LTS and we have had no problems at all, with the last two MariaDB upgrades within Plesk, when using this page for guidance. Now though, we can't yet / won't upgrade from MariaDB 10.3.* to MariaDB 10.4.* and/or MariaDB 10.5.*, becasue there's no confirmation from Plesk in the guideance section, well not yet :o)) that either of these upgrades will be fully successful (which means previously, they have actually been tested & verified by Plesk themselves)
There's no need to publish this comment, as it's aimed purely for yourself Ivan Postnikov but it is much better for all concerned, if these missing details are very quickly added, because as you know MariaDB downgrades don't work / are not reccomended even by MariaDB themselves.
Some Plesk users, who don't read any comments & only read the guidance sections on this page, if, they haven't taken a server snapshot backup or similar, prior to their MariaDB upgrade process, might inadvertently, make their own server and Plesk installation, totally unusable and irrecoverable.
Can you also add Debian (10) Buster above? MariaDB update to 10.4 worked without complications. Unfortunately it is not clear from the article of MariaDB (DEB-files) if an update to version 10.5 under Debian Buster is also possible.
Greetings
I have this error:
file /usr/share/mysql/charsets/Index.xml from install of MariaDB-common-10.3.24-1.el8.x86_64 conflicts with file from package mysql-common-8.0.21-1.module_el8.2.0+493+63b41e36.x86_64
file /usr/share/mysql/charsets/armscii8.xml from install of MariaDB-common-10.3.24-1.el8.x86_64 conflicts with file from package mysql-common-8.0.21-1.module_el8.2.0+493+63b41e36.x86_64...
Thanks a lot for answering, Anton Maslov. It's too late. I already performed the upgrade, seems to be successful. I performed the steps from the tutorial above. Apart from the install notice "Fatal error..." everything is running fine on 10.5.5. I had the same problem by upgrading from 10.2 to 10.3. So, if nothing bad will happen I'll run it until I change my server next year after three/four years.
Greets
Hello,
Mark S. 10.5 should also work fine. The article author will double-check it and add corresponding instructions.
Learning Curve Thank you for the feedback. These points will be also reviewed and we'll look at how to improve the article.
We have Obsidian 18.0.30 on Centos 7.8 and mariadb 5.65 (which is running) and yum
BUT the directory /etc/yum.repos.d/ does not exist NOR does the file MariaDB.repo in fact
we can't find that file anywhere on our dedicated server!
So the instructions for Centos 7 just don't work??
Mark S.
Instructions for Debian 10 were added.
Sid B
Typically /etc/yum.repos.d/ exists on CentOS server. Try creating the directory and file MariaDB.repo
Permissions for yum.repos.d:
drwxr-xr-x 2 root root
For MariaDB.repo:
-rw-r--r-- 1 root root ... MariaDB.repo
Also, we have a team which does such tasks for server owners on a paid basis: https://www.plesk.com/professional-services/administrative-services/
@Sebastian Ayala,
From the provided logs it looks that the previous version of MySQL wasn't removed properly.
Please make sure that all steps from the guide were completed successfully.
If not, feel free to submit the ticket to our Support Team.
There maybe some speciifc fine details in the above guide for Ubuntu 18.04, that have yet to be added (at the time of this note; 13/10) but after some external research and some advance consulation with Plesk, we ran the upgrade process from MariaDB 10.3.* to 10.4.* and that went very smoothly. No issues, faults, warnings or errors when testing afterwards.
We then, ran the upgrade process from MariaDB 10.4.* to MariaDB 10.5.* . Yes we could have just run the upgrade process from MariaDB 10.3.* to MariaDB 10.5.* and just omitted MariaDB 10.4.*, but one major release at a time, gave a much better recovery position (recoverable cloud server snapshot) if one was needed.
Compared to previous releases, there are a few subtle MariaDB changes in MariaDB 10.5.* though, e.g.
"...From MariaDB 10.4.6, mariadb is available as a symlink to mysql.
From MariaDB 10.5.2, mysql is the symlink, and mariadb the binary name..."
Plus, depending on your own install process choices, others things, including say; /etc/mysql/mariadb.cnf and etc/logrotate.d/mysql-server may need attention afterwards, but, Plesk were helpful in advance, so after some 'fine tuning' following the final upgrade; the Ubuntu 18.04.5 LTS / Obsidian 18.0.30 / MariaDB 10.5.6 combination is running like clockwork, with no issues, faults, warnings or errors. It was worth the effort.
Please sign in to leave a comment.