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
- 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 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
Jan Bludau Done :)
Dear Ivan,
thanks for pointing out the easy way to disable the repo.
When login into the server back-end this morning. Plesk wants to update the MySQL server! When I go to the Plesk page: "available updates", it shows me the following updates:
How do I get rid of this? Because when running der yum update on cli, it shows that there are no updates.
thx Alexander
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...
Hello @WebITBuero
Thank you for bringing our attention on this. The article is updated.
After upgrade there is an error when Im creating database
"error: Connection to the database server failed: The user specified as a definer ('root'@'localhost') does not exist plesk"
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/
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??
Hi,
After upgrading mariadb from version 10.1 to 10.3 on debian 9.12 plesk does not seem to recognize the mysql service anymore under server components and says "The component was not installed". Everything seems to be working fine though and under "Database Servers" the new version seems in place. I followed the procedure for debian 8/9 in this article and executed the commands to update the package version inside plesk. Below you can find more details regarding my configuration:
mysql Ver 15.1 Distrib 10.3.23-MariaDB, for debian-linux-gnu (x86_64)
Plesk Obsidian Web Host Edition
Version 18.0.27 Update #1
Thank you in advance for your reply! Cheers
i've read the changelog nothing spezial there ... ok it was risky but its my development and test-server where i did it... mariabdb 10.4 works very well.
Some advantages are:
DoS Protection
Bruteforce Detection
Plesk should support the newest version officially.
@Jonathan instead of 'service mariadb stop' you can try to run 'systemctl stop mariadb.service'. As for 'yum repolist', as it is described in "For CentOS 7" section of this article, make sure you create `/etc/yum.repos.d/MariaDB10.1.repo` file with the corresponding content.
Hello @Alejandro Stendelis,
Try to clean up the list of the mirrors.
1. Install yum utils:
# yum install yum-utils
2. Run the following command:
# yum clean all
If the issue still persists, please submit the ticket and we investigate the issue:
How to submit a request to Plesk support?
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
For Information (may be useful to some other users). At the time of making this specific post, we're now running: Ubuntu 18.04.3 LTS / Plesk onyx 17.8.11 / MariaDB 10.3.17 with no issues or problems (Plesk or MariaDB)
We needed to upgrade from MariaDB 10.2.* to MariaDB 10.3.* for some of the domains that we host, due to the software they run. Not wanted... Needed! Yes MariaDB 10.2.* is still a stable MariaDB release, but is too old now for some applications, plus MariaDB 10.3.* & MariaDB 10.4.* specifically, offer lots more improved functionality.
Waiting for Plesk Obsidian to finally be released at 'early adopter' status was/is still not an option for us. FWIW If Obsidian is NOT released c/w full Plesk support for MariaDB 10.4.* then serious questions need to be asked!! Plesk avoiding 'officially supporting' latest, stable releases, mainly, due to lack of advance testing time? Hmmm
Back to the MariaDB 10.2.* to MariaDB 10.3.* upgrade. We posted a Plesk support ticket to try and treble check everything that we could in advance and the support team were extremely helpful. We ran the upgrade, tested everything, then restored a snapshot to take the server back to the Pre-MariaDB upgrade status. We then asked more specific questions (all of which, again, were very helpfully answered by the support team) but then we waited for the next Plesk 17.8.11 update before proceeding any further. Why? That's becasue we wanted to upgrade MariaDB, but, also, wanted to then test that setup by running a Plesk update too, before taking anything / everything live. That we did & there were no issues. The Plesk 17.8.11 update on our Ubuntu 18.04.3 LTS / MariaDB 10.3.17 setup ran perfectly, with no problems, which was nice & this completed our pre-live testing.
MariaDB 10.3.* on Plesk 17.8.11 is still not 'offcially supported' (and most likely, never will be now) but on our current server / domains / software setup it's all good & fingers crossed, we're satisfied with everything so far!
Hello @Artur Beqiraj
We recommend upgrading to MariaDB 10.1 at least. There is no significant difference, however, it will be easier to install MariaDB 10.1 or 10.2
Hello Kingsley Felix
As I can see, you've already contacted our Professional Services for assistance!
Hi Great guys,
I install Mysql in the AWS linux server, it is version mysql Ver 15.1 Distrib 5.5.68-MariaDB, for Linux (x86_64) using readline 5.1 (exported by Mysql -V).
But I want upgrade 5.5.68-MariaDB to 10.3+ MarinaDB . In my server has no /etc/psa/.psa.shadow folder and file. I tried to run the commands but there are many error. Could you tell me what I should to do please ? Thank you so much !
error :
---> Package socat.x86_64 0:1.7.3.2-2.amzn2.0.1 will be installed
--> Finished Dependency Resolution
Error: Package: MariaDB-client-10.4.17-1.el8.x86_64 (mariadb)
Requires: libc.so.6(GLIBC_2.28)(64bit)
Error: Package: MariaDB-server-10.4.17-1.el8.x86_64 (mariadb)
Requires: libc.so.6(GLIBC_2.28)(64bit)
Error: Package: MariaDB-shared-10.4.17-1.el8.x86_64 (mariadb)
Requires: libc.so.6(GLIBC_2.28)(64bit)
Error: Package: galera-4-26.4.6-1.el8.x86_64 (mariadb)
Requires: libboost_program_options.so.1.66.0()(64bit)
Error: Package: MariaDB-backup-10.4.17-1.el8.x86_64 (mariadb)
Requires: libc.so.6(GLIBC_2.28)(64bit)
Error: Package: MariaDB-server-10.4.17-1.el8.x86_64 (mariadb)
Requires: libcrypt.so.1(XCRYPT_2.0)(64bit)
Error: Package: MariaDB-backup-10.4.17-1.el8.x86_64 (mariadb)
Requires: libcrypt.so.1(XCRYPT_2.0)(64bit)
Error: Package: MariaDB-client-10.4.17-1.el8.x86_64 (mariadb)
Requires: libcrypt.so.1(XCRYPT_2.0)(64bit)
Error: Package: MariaDB-server-10.4.17-1.el8.x86_64 (mariadb)
Requires: libsepol >= 2.8-2.el8
Installed: libsepol-2.5-8.1.amzn2.0.2.x86_64 (installed)
libsepol = 2.5-8.1.amzn2.0.2
Available: libsepol-2.5-6.amzn2.x86_64 (amzn2-core)
libsepol = 2.5-6.amzn2
Available: libsepol-2.5-8.1.amzn2.i686 (amzn2-core)
libsepol = 2.5-8.1.amzn2
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
[
It didn't work for me in 100%.
I was upgrading MySQL 5.1 to 5.7 om my CentOS 6 and I couldn't start mysql.
# service mysqld start - gave me nothing, even no single line in /var/log/mysqld.log.
What I did:
1. I started mysql service from a file /usr/sbin/msqld to check what a problem was
2. The problem was in config file /etc/my.cnf
[ERROR] unknown variable 'innodb_additional_mem_pool_size=500K'
I had to comment this line.
3. After that I had a problem with access to the user table.
[ERROR] Fatal error: mysql.user table is damaged. Please run mysql_upgrade.
mysqld --skip-grant-tables - it starts without reading the user table
mysql_upgrade - then I could upgrade my tables
killall mysqld - killing all the mysql instances
4. Finally
# service mysqld start
Hello giuseppe amodio,
Thank you for your comment. I've re-tested the script on a test server. It is possible to execute it as Superuser using the 'sudo ./c7-mariadb-10.5-upgrade.sh' command.
So the following statement from the article is correct:
There is an error in the attached script.
This doesn't do anything, the files and directories are copied to /dev/null
echo "creating backup of mysql directory"
cp -v -a /var/lib/mysql/ /var/lib/mysql_backup 2&> /dev/null
It should be something like this, copying the errors to /dev/null
echo "creating backup of mysql directory"
cp -v -a /var/lib/mysql/ /var/lib/mysql_backup 2> /dev/null
The upgrade script link is broken for CentOS 7
[root@srvr ~]# wget https://plesk.zendesk.com/hc/article_attachments/360022419980/mariadb-10.5-upgrade.sh && chmod +x mariadb-10.5-upgrade.sh
--2022-03-08 21:18:39-- https://plesk.zendesk.com/hc/article_attachments/360022419980/mariadb-10.5-upgrade.sh
Resolving plesk.zendesk.com (plesk.zendesk.com)... 104.16.51.111, 104.16.53.111
Connecting to plesk.zendesk.com (plesk.zendesk.com)|104.16.51.111|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-03-08 21:18:40 ERROR 404: Not Found.
Can someone please provide the updated link?
Hello Javier Cota,
The link was updated. Thank you for bringing it to our attention!
Hello Michael,
I have the exact same problem when trying to update MySql (MariaDB).
Unable to remove the old SQL version....
I hope that if you find a solution, you will put it here.
Henk
If I remember correctly, the "exclude=MariaDB" resulted from a situation where an automatic update updated MariaDB to a version that failed with certain database attributes and was shortly revoked after publication. At that time the advice was to exclude MariaDB from automatic updates (from Yum respectively). So indeed, this is an "extra" user-driven configuration that is not the MariaDB or Yum default.
Hello @Steve,
Thank you for the information.
Hello Carlos Lopez,
To update to MariaDB 10.6 on Centos 7 you will need to apply the Manual Solution for Centos 7. In step 6 it will be required to open the Setting MariaDB repositories page, select your OS distro, release, and desired MariaDB version, and place the provided output to the `/etc/yum.repos.d/MariaDB.repo` file as per steps 6.1 and 6.2.
Serverplan Plesk
What exactly did not work, e.g. what error messages have been displayed? Was "yum clean all" your solution?
Hi Julian,
Are you on CentOS 7? Maybe something changed recently then. The last few times I've installed updates they go in and create the file. A few months later, maybe, we install a kernel update and restart the server. Even after that the "mysql" service is running and is MariaDB like I said, so I don't immediately notice anything wrong. But we have a nightly script that runs "/bin/systemctl stop mariadb.service" and "/bin/systemctl start mariadb.service" to copy the raw MySQL files (in addition to an export), and the start fails because "mysql" is already running. It caught me a couple times in the past year, so I thought I'd post about it for others.
I am unable to upgrade from MariaDB 10.1 to 10.2. I get this error:
This is a brief description of the upgrade process. Important details
can be found in the MariaDB manual, in the Upgrading section.
******************************************************************
error: %pre(MariaDB-server-10.2.41-1.el7.centos.x86_64) scriptlet failed, exit status 1
Error in PREIN scriptlet in rpm package MariaDB-server-10.2.41-1.el7.centos.x86_64
MariaDB-server-10.1.48-1.el7.centos.x86_64 was supposed to be removed but is not!
Verifying : MariaDB-server-10.1.48-1.el7.centos.x86_64 1/2
Verifying : MariaDB-server-10.2.41-1.el7.centos.x86_64 2/2
Failed:
MariaDB-server.x86_64 0:10.1.48-1.el7.centos MariaDB-server.x86_64 0:10.2.41-1.el7.centos
Complete!
Anyone has any ideas?
Hello,
What do I need to change to upgrade to 10.6 on CentOs 7?
Thanks in advance.
Hi on Ubuntu 18.04 bionic... I followed your procedure and had 2 issues :
1) mirror.truenetwork.ru is not responding, I used sfo1.mirrors.digitalocean.com instead (found on mariadb.com)
2) apt-get install gave me : "mariadb-server : Depends: mariadb-server-10.5" "Unable to correct problems, you have held broken packages". I googled and solved this by :
found on stackoverflow.com.
Then after first start of mariadb service I had 2 errors messages, but this was only for the first start before the end of the procedure... finger cross ;-)
Please sign in to leave a comment.