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
Hi there,
some changes for CloudLinux:
1. Please add
mariadb103
for MariaDB v10.3mariadb104
for MariaDB v10.42. Please remove:
MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin
This command is not needed. Console say it is already performed and you have to add -force...
Big thank you and have a great day!
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
This article solved my problem, thanks.
HI All,
I am having issues to upgrade MySQL from 5.5 to maridb10.2.
I am following the steps for Cloud Linux but when I am in the step 6 which is:
/usr/share/lve/dbgovernor/mysqlgovernor.py --install
The command returns an error saying that it could not install that because the file wasn't found:
[root@localhost~]# /usr/share/lve/dbgovernor/mysqlgovernor.py --install
!!!Before making any changing with database make sure that you have reserve copy of users data!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!Ctrl+C for cancellation of installation!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Instruction: how to create whole database backup - http://docs.cloudlinux.com/index.html?backing_up_mysql.html
Start download current installed packages
WARNING!!!! Package mariadb-5.5.60-1.el7_5.cloudlinux.x86_64 was not downloaded
WARNING!!!! Package mariadb-libs-5.5.60-1.el7_5.cloudlinux.x86_64 was not downloaded
WARNING!!!! Package mariadb-server-5.5.60-1.el7_5.cloudlinux.x86_64 was not downloaded
Trying to load custom packages from yum
WARNING!!!! Package mariadb-5.5.60-1.el7_5.cloudlinux.x86_64 was not downloaded
WARNING!!!! Package mariadb-libs-5.5.60-1.el7_5.cloudlinux.x86_64 was not downloaded
WARNING!!!! Package mariadb-server-5.5.60-1.el7_5.cloudlinux.x86_64 was not downloaded
Start download packages for new installation
Loaded plugins: fastestmirror, rhnplugin
Cleaning repos: PLESK_17_8_11-extras PLESK_17_PHP56 PLESK_17_PHP70 PLESK_17_PHP71 PLESK_17_PHP72 PLESK_17_PHP73 cl-mysql-meta cloudlinux-x86_64-server-7 plesk-migrator plesk-migrator-tp
Cleaning up list of fastest mirrors
Other repos take up 106 k of disk space (use --verbose for details)
Execution command: repoquery --requires cl-MariaDB-meta error
Traceback (most recent call last):
File "/usr/share/lve/dbgovernor/mysqlgovernor.py", line 349, in <module>
main(sys.argv[1:])
File "/usr/share/lve/dbgovernor/mysqlgovernor.py", line 213, in main
if manager.install(opts.install_beta, opts.yes, opts.wizard):
File "/usr/share/lve/dbgovernor/modules/base.py", line 205, in install
self._load_packages(beta)
File "/usr/share/lve/dbgovernor/modules/base.py", line 557, in _load_packages
self._new_packages = self._load_new_packages(beta)
File "/usr/share/lve/dbgovernor/modules/base.py", line 755, in _load_new_packages
packages += exec_command("repoquery --requires %s" % name)
File "/usr/share/lve/dbgovernor/utilities.py", line 491, in exec_command
raise RuntimeError("%s\n%s" % (out, err))
RuntimeError:
failure: repodata/repomd.xml from cl-mysql-meta: [Errno 256] No more mirrors to try.
http://repo.cloudlinux.com/other/cl7.6/mysqlmeta/cl-mariadb-10.2/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
So I tried to check why the repo link didn't work and if you go to that folder by surfing to it manually with a browser, then I realized that it doesn't exist for my Cloud Linux 7.6, please see below:
What you get when you go to that URL:https://www.repo.cloudlinux.com/other/
So there is not folder for my version of CL7.6, so my question is how can I fix this?
Should I edit repo manually and use the files for cl7.2?
Could someone from Plesk review this, please?
Thanks,
Jorge
Artyom Baranov
i have specific but has in this error after instalation
Transaction check error:
file /etc/init.d/mysql conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
file /etc/my.cnf.d/server.cnf conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
file /usr/bin/aria_chk conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
file /usr/bin/aria_dump_log conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
file /usr/bin/aria_ftdump conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
file /usr/bin/aria_pack conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
file /usr/bin/aria_read_log conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
file /usr/bin/innochecksum conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
file /usr/bin/my_print_defaults conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
file /usr/bin/myisam_ftdump conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
file /usr/bin/myisamchk conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
file /usr/bin/myisamlog conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
file /usr/bin/myisampack conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
file /usr/bin/mysql_tzinfo_to_sql conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
file /usr/bin/mysql_upgrade conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
file /usr/bin/mysqlbug conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
Hello @Alexander,
As suggested by my colleague at https://support.plesk.com/hc/en-us/articles/360010401659-MariaDB-does-not-start-after-update-on-November-the-5th-Assertion-failure-in-file?source=search:
To disable auto-updates until MariDB fix the bug, disable their repository, e.g. for CentOS:
# sed -i 's/enabled=1/enabled=0/g' /etc/yum.repos.d/MariaDB.repo
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.
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?
Hi, there used to be a video here guiding you through the process (as I keep getting stuck at point 4 - Plesk on CentOS 6), I wanted to watch the video again to refresh (I can't change the enabled=1 to 0 for some reason) then can't exit the screen when I think I have done, the video has been removed as I guess it was outdated?
Are you planning on adding an updated video, updating from 5.1 to 5.5 worked as expected, just this next part, thanks in advance.
MariaDB 10.2 is not yet officially supported. It is not causing issues in the panel, but the database repair tool claims that some date/timestamp fields are misconfigured, and it is unable to repair them. It would be good to add a check in the installation routines of Plesk to prohibit an installation on MariaDB 10.2. I only "accidentally" installed it on a 10.2 and found out about the wrong version in a recent support ticket.
Hello Ivan!
I have Plesk Onyx Version 17.8.11 Update #19 on a CentOS Linux 7.5.1804 (Core) with a MySQL (Maria DB I belief) ver.5.5.60. on a dedicated server.
I have a script that requires MySQL ver. 5.6, and error flags with [No MySQL available] when I tried to install it just to see.
The script developer tells me to move to a server with Cpanel, and that is out of the question, as I have used Plesk since version 7 or 8 I believe. I cannot get a refund either, as this is not a script failure, and I'm not going to write off $800 either, and there's no other script with what I need anyway.
I have currently 2 servers with Plesk licenses, and I can experiment with one not so important.
However, my time is on a tremendous squeeze, so I would like to start out with something that works without trying to experiment with version after version.
Should I try to install the latest MariaDB 10.3, or is it possible to install a MySQL 5.6 as required, and a better option. I would appreciate your opinion. Thank you kindly!
I've followed the Centos 6 guide, everything seem to install but it's still running MySql 5.5.57
I've tried service mysqld restart
But this doesn't seem to do anything.
Hi Nerque that is correct, you may skip this part:
rpm -q --whatprovides mariadb-server
rpm -e --nodeps `rpm -q --whatprovides mariadb-server`
Since you are already running mariadb you do not need to remove mysql.
Hi @Nikita Nikushkin,
Thank you for your answer and your help, I didn't notice that it was not yet supported in Plesk. Therefore, it's not possible to make the upgrade for MySQL 5.5 to 5.7 for client side until the full adoption of the 10.3 version ?
If I downgrade to the 10.2, will it be possible ? The update from 5.5 to 5.7 is automatic or some commands should be run ? I didn't find any clue on the MariaDB website.
Best Regards
Ok thanks Ivan!!
It already seems that Plesk is running much faster on MariaDB 10.3 than on previous 5.5 👍
Do we need to secure MariaDB? I was reading a tutorial (https://linuxize.com/post/install-mariadb-on-centos-7/) that recommended to run the
mysql_secure_installation
script which will perform several security related tasks like set up the root user password, remove the anonymous user, restrict root user access to the local machine, and remove the test database.Or does Plesk takes care of this already?
Thanks again!
@Domenico,
Hello,
In such case, it is still possible to get support from Plesk directly. Please check the article How to get support directly from Plesk?
Plesk support subscription will allow you to submit a request if you decide to continue with MySQL upgrade.
Hello Miguel Ángel
This option by itself shouldn't cause the issue.
If it's still actual, submit a support request.
Hi there,
my PLESK backend is showing MariaDB 10.5.9 but my server is running 10.5.10. I updatet from 10.5.9 and performed this 2 commands:
#plesk bin service_node --update local
# plesk sbin packagemng -sdf
@Peter It would be great if you provide your suggestion on our Plesk User Voice. Thank you!
Hi,
I have tried to run the commands on Centos 7 on a test VPS.
I get no errors, but in the GUI it stills show 5.5.60 as database server version.
In the CLI I see this:
mysql Ver 15.1 Distrib 10.2.23-MariaDB,
Did I missed something?
==
Never mind, now its shows the 10.2.23 version.
Probaly some updates didnt renew directly.
Will try to run on the live server.
Hi I get this error, how I can fix it??
CentOS 6.8
mysql Ver 14.14 Distrib 5.5.30, for Linux (x86_64) using readline 5.1
[root@casadimaco ~]# yum update mysql
Loaded plugins: fastestmirror
Setting up Update Process
Loading mirror speeds from cached hostfile
* base: mirror.fileplanet.com
* extras: mirrors.oit.uci.edu
* updates: mirrors.usc.edu
Resolving Dependencies
--> Running transaction check
---> Package mysql.x86_64 0:5.5.30-1.el6.remi will be obsoleted
--> Processing Dependency: mysql(x86-64) = 5.5.30-1.el6.remi for package: mysql-bench-5.5.30-1.el6.r emi.x86_64
--> Processing Dependency: mysql(x86-64) = 5.5.30-1.el6.remi for package: mysql-server-5.5.30-1.el6. remi.x86_64
--> Processing Dependency: mysql(x86-64) = 5.5.30-1.el6.remi for package: mysql-devel-5.5.30-1.el6.r emi.x86_64
---> Package mysql-community-client.x86_64 0:5.7.25-1.el6 will be obsoleting
--> Processing Dependency: mysql-community-libs(x86-64) >= 5.7.9 for package: mysql-community-client -5.7.25-1.el6.x86_64
--> Running transaction check
---> Package mysql-bench.x86_64 0:5.5.30-1.el6.remi will be obsoleted
---> Package mysql-community-devel.x86_64 0:5.7.25-1.el6 will be obsoleting
---> Package mysql-community-libs.x86_64 0:5.7.25-1.el6 will be obsoleting
--> Processing Dependency: mysql-community-common(x86-64) >= 5.7.9 for package: mysql-community-libs -5.7.25-1.el6.x86_64
---> Package mysql-community-server.x86_64 0:5.7.25-1.el6 will be obsoleting
--> Processing Dependency: libnuma.so.1(libnuma_1.2)(64bit) for package: mysql-community-server-5.7. 25-1.el6.x86_64
--> Processing Dependency: libnuma.so.1(libnuma_1.1)(64bit) for package: mysql-community-server-5.7. 25-1.el6.x86_64
--> Processing Dependency: libnuma.so.1()(64bit) for package: mysql-community-server-5.7.25-1.el6.x8 6_64
---> Package mysql-devel.x86_64 0:5.5.30-1.el6.remi will be obsoleted
---> Package mysql-libs.x86_64 0:5.5.30-1.el6.remi will be obsoleted
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: php-mysql-5.4.13-1.el6.remi.x8 6_64
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_16)(64bit) for package: php-mysql-5.4 .13-1.el6.remi.x86_64
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: php-mysql-5.4 .13-1.el6.remi.x86_64
---> Package mysql-server.x86_64 0:5.5.30-1.el6.remi will be obsoleted
--> Running transaction check
---> Package mysql-community-common.x86_64 0:5.7.25-1.el6 will be installed
---> Package mysql-libs.x86_64 0:5.5.30-1.el6.remi will be obsoleted
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: php-mysql-5.4.13-1.el6.remi.x8 6_64
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_16)(64bit) for package: php-mysql-5.4 .13-1.el6.remi.x86_64
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: php-mysql-5.4 .13-1.el6.remi.x86_64
---> Package numactl.x86_64 0:2.0.9-2.el6 will be installed
--> Finished Dependency Resolution
Error: Package: php-mysql-5.4.13-1.el6.remi.x86_64 (installed)
Requires: libmysqlclient.so.18()(64bit)
Removing: mysql-libs-5.5.30-1.el6.remi.x86_64 (installed)
libmysqlclient.so.18()(64bit)
Obsoleted By: mysql-community-libs-5.7.25-1.el6.x86_64 (mysql57-community)
Not found
Available: mysql-libs-5.5.28-3.el6.remi.x86_64 (mt_dv_extras)
libmysqlclient.so.18()(64bit)
Available: mysql-libs-5.5.29-1.el6.remi.x86_64 (mt_dv_extras)
libmysqlclient.so.18()(64bit)
Available: mysql-libs-5.1.73-8.el6_8.i686 (base)
Not found
Error: Package: php-mysql-5.4.13-1.el6.remi.x86_64 (installed)
Requires: libmysqlclient.so.18(libmysqlclient_18)(64bit)
Removing: mysql-libs-5.5.30-1.el6.remi.x86_64 (installed)
libmysqlclient.so.18(libmysqlclient_18)(64bit)
Obsoleted By: mysql-community-libs-5.7.25-1.el6.x86_64 (mysql57-community)
Not found
Available: mysql-libs-5.5.28-3.el6.remi.x86_64 (mt_dv_extras)
libmysqlclient.so.18(libmysqlclient_18)(64bit)
Available: mysql-libs-5.5.29-1.el6.remi.x86_64 (mt_dv_extras)
libmysqlclient.so.18(libmysqlclient_18)(64bit)
Available: mysql-libs-5.1.73-8.el6_8.i686 (base)
Not found
Error: Package: php-mysql-5.4.13-1.el6.remi.x86_64 (installed)
Requires: libmysqlclient.so.18(libmysqlclient_16)(64bit)
Removing: mysql-libs-5.5.30-1.el6.remi.x86_64 (installed)
libmysqlclient.so.18(libmysqlclient_16)(64bit)
Obsoleted By: mysql-community-libs-5.7.25-1.el6.x86_64 (mysql57-community)
Not found
Available: mysql-libs-5.5.28-3.el6.remi.x86_64 (mt_dv_extras)
libmysqlclient.so.18(libmysqlclient_16)(64bit)
Available: mysql-libs-5.5.29-1.el6.remi.x86_64 (mt_dv_extras)
libmysqlclient.so.18(libmysqlclient_16)(64bit)
Available: mysql-libs-5.1.73-8.el6_8.i686 (base)
Not found
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
@Stefan, use the instruction from this article.
Please note that it is highly recommended to create a full server backup before applying resolution steps.
The solution is applied on your own risk.
re: the CentOS 7 instructions: "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"
...it is my experience that running "yum update" and having it install updates to MariaDB 10.2 recreates the file /etc/init.d/mysql. At the next boot the "mysql" service (which is MariaDB) will start, and any scripts that try to stop and start mariadb may fail since mariadb is "not running" even though it is under the other service name. In other words /etc/init.d/mysql would need to be deleted after installing updates.
Hello @Alexander,
This article is devoted to your issue: https://support.plesk.com/hc/en-us/articles/360010401659-MariaDB-does-not-start-after-update-on-November-the-5th-Assertion-failure-in-file?source=search
The issue is caused by the last MariaDB update and confirmed as MariaDB bug MDEV-20987
This issue affects the following versions of the MariaDB SQL Server:
Hi @Victor Fournier,
MySQL upgrade from 5.5 to 5.6/5.7 is possible by using steps from this article, as well as MariaDB upgrade from 5.5 to 10.0/10.1/10.2
However, it is not possible to upgrade MariaDB to MySQL or vice versa as they are different products
MariaDB downgrade is not supported be Plesk and this procedure can break Plesk working capacity
Also, the official MariaDB website tells that downgrading MariaDB is not supported as well:
In this article, it was strongly recommended to create a server snapshot/full server backup.
So, if you have one, restore the server from it and perform the upgrade of MariaDB to the supported version one more time. It is the best way
If you have no server backup, you can try to do the following at your own risk:
1. Create a full server backup/snapshot
2. Stop MariaDB service
3. Remove MariaDB packages
4. Disable MariaDB 10.3 repository
5. Install the same MariaDB version as it was before the upgrade procedure
6. Stop MariaDB service
7. Free up the current "/var/lib/mysql" folder and move databases dumps to it. By default, they have to located in the "/var/lib/mysql_backup" folder
8. Start MariaDB service
9. Perform the upgrade of MariaDB again to the supported version by Plesk if it is required
@Ivan: the mysql-upgrade guide is complette, everythink worked as aspected :-)
to be more update2date is quite nice, more performance is also quite nice =D
on the plesk gui for install i see that i could install a "MySQL Server" why you don't support updating it?
the guide works as aspected, fully automatical, without a user input. You give an notice that you will do an backup and everything is cool :-)
without exakt that line: "rpm -e --nodeps `rpm -q --whatprovides mysql-server`" you will destroy the plesk installation *smile*
Hi @Victor Fournier,
Based on the provided information:
you performed an upgrade to MariaDB 10.3
As far as I can see, the local MySQL server was upgraded successfully
Keep also in mind that Plesk supports MariaDB 10.3 in upcoming Plesk 17.9 only:
MariaDB 10.3 support in Plesk
The same information is available in the Notes section in this article:
Hello,
After upgrading to MariaDB 10.2 I have mysql warning in my log.
...
2019-10-25 9:08:08 139900448986880 [Warning] InnoDB: Cannot add field `external_id` in table `psa`.`clients` because after adding it, the row size is 8714 which is greater than maximum allowed size (8126) for a record on index leaf page.
2019-10-25 9:08:14 139900448782080 [Warning] InnoDB: Cannot add field `page_wrapper_template` in table `admin_d_db`.`IPB_cms_pages` because after adding it, the row size is 8858 which is greater than maximum allowed size (8126) for a record on index leaf page.
2019-10-25 9:08:22 139900448986880 [Warning] InnoDB: Cannot add field `page_wrapper_template` in table `admin_db`.`IPB_cms_pages` because after adding it, the row size is 8858 which is greater than maximum allowed size (8126) for a record on index leaf page.
2019-10-25 9:08:27 139900448782080 [Warning] InnoDB: Cannot add field `category_last_title` in table `admin_db`.`IPB_cms_database_categories` because after adding it, the row size is 8766 which is greater than maximum allowed size (8126) for a record on index leaf page.
2019-10-25 9:08:46 139900448782080 [Warning] InnoDB: Cannot add field `country` in table `admin_whmc1`.`tblclients` because after adding it, the row size is 8690 which is greater than maximum allowed size (8126) for a record on index leaf page.
2019-10-25 9:10:01 139900449396480 [Warning] InnoDB: Cannot add field `record_edit_member_name` in table `admin_d_db`.`IPB_cms_custom_database_1` because after adding it, the row size is 8152 which is greater than maximum allowed size (8126) for a record on index leaf page.
2019-10-25 9:13:36 139900449396480 [Warning] InnoDB: Cannot add field `video_poster` in table `admin_d_db`.`IPB_videos_videos` because after adding it, the row size is 8754 which is greater than maximum allowed size (8126) for a record on index leaf page.
2019-10-25 9:17:02 139900447553280 [Warning] InnoDB: Cannot add field `month` in table `psa`.`ScheduledTasks` because after adding it, the row size is 8567 which is greater than maximum allowed size (8126) for a record on index leaf page.
Should I edit my.cnf?
If so, what are the optimum values?
OS: Ubuntu 18.04.3 LTS
Plesk Obsidian 18.0.20
Thank You for Answer
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.
Hi @Christopher-James Sheppard,
There is no solution to roll-back MySQL to the previous version. In case of the upgrade failure, it is necessary to find the cause of the failure and finish the upgrade.
Please note that it is strongly recommended to create a server snapshot before initializing MySQL upgrade just in case.
Also, if you prefer that the upgrade is performed by Plesk professionals, I suggest you contact our Professional Services Team and discuss this task with them: https://www.plesk.com/professional-services/ . In this case, it will be performed on a paid basis.
Please sign in to leave a comment.