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/10.6 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 later versions are supported starting from Plesk Obsidian 18.0.30. Previous versions (Onyx and older) do not support MariaDB starting from 10.3 and there are no plans to implement it currently.
Warning:
Direct upgrade from MySQL 5.1 to MySQL 5.6/5.7 will break tables structure. The instructions for upgrading MySQL from 5.1 to 5.5 on Linux are available here: How to upgrade MySQL from 5.1 to 5.5 on Linux
Warning:
Direct upgrade from MariaDB 5.5 or 5.7 to MariaDB 10.6 or later versions is not possible.
You should first upgrade MariaDB 5.5. or 5.7 to any MariaDB from 10.3 to 10.5, and then perform an update to MariaDB 10.6 or later
It is strongly recommended to create a server snapshot (full backup) before upgrading. Perform MySQL 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 later versions 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
- In case upgrading to MariaDB 10.6 or newer it is needed to 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/my.cnf
-
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 MariaDB 10.5 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://raw.githubusercontent.com/plesk/kb-scripts/master/c7-mariadb-10-5-upgrade/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 > /root/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 mariadb-server package is already installed:
# rpm -q --whatprovides mariadb-server
If it is installed and the command above gives output, remove using the following command:
# rpm -e --nodeps `rpm -q --whatprovides mariadb-server`
-
Configure MariaDB repository:
Warning: MariaDB 10.4 and later versions are supported since 18.0.30, make sure the latest Plesk version is installed.
Here is an example for MariaDB 10.5:
6.1. The following command adds the MariaDB 10.5 repository:
# curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash -s -- --mariadb-server-version=10.5
Note: Make sure that other MariaDB repositories are not enabled in
/etc/yum.repos.d/
. -
Reset all the cache:
# yum clean all
-
Start an upgrade of MariaDB:
# yum install MariaDB-client MariaDB-server MariaDB-compat MariaDB-shared
- In case upgrading to MariaDB 10.6 or newer it is needed to 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/my.cnf
-
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 -f /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 > /root/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
- In case bind-address directive is present in
/etc/my.cnf
make sure that it is as follows :
# bind-address = 127.0.0.1
-
Start the MySQL service:
# service mysqld start
-
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.5mariadb106
for MariaDB v10.6mysql55
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 > /root/all-databases.sql
-
Stop MariaDB:
# service mariadb stop
Here is an example for MariaDB 10.4:
Warning: MariaDB 10.4 and later versions are supported since 18.0.30, make sure the latest Plesk version is installed.
-
Install repositories:
# apt-get install software-properties-common dirmngr apt-transport-https
# apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'
# curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash -s -- --mariadb-server-version=10.5
-
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:
# systemctl start mariadb.service
-
Upgrade MySQL databases:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin
-
Restart mysql service:
# systemctl restart mariadb
-
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 later versions are supported since 18.0.30, make sure the latest Plesk version is installed.
-
Install repositories:
# apt-get install software-properties-common
# apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'
# curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash -s -- --mariadb-server-version=10.2
-
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:
# systemctl start mariadb
-
Upgrade MySQL databases:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin
-
Restart mysql service:
# systemctl restart mariadb
-
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 later versions are supported since 18.0.30, make sure the latest Plesk version is installed.
-
Install repositories:
# apt-get install software-properties-common
# apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc'
# curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash -s -- --mariadb-server-version=10.4
-
Create a backup of all MySQL data:
# cp -v -a /var/lib/mysql/ /var/lib/mysql_backup
-
Start an upgrade with the following command. Leave all fields empty when asked for a 'root' user password:
# apt-get update
# apt-get install mariadb-server
- Adjust the
my.cnf
configuration file to match the new requirements:
# sed -i 's/bind-address = ::ffff:127.0.0.1/bind-address = 127.0.0.1/g' /etc/mysql/my.cnf
-
Start the MariaDB service:
# service mariadb start
-
Upgrade MySQL 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
258 comments
Hi @Roberto,
I'd recommend contacting our Support Team for assistance. They will check this issue in details
i have ubuntu 18.04.3, Plesk Obsidian 18.0.20 update 2 and mariadb default 10.1
I applied this article in order.
after;
root@sonbahar:~# apt install mariadb-server
...
Job for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
● mariadb.service - MariaDB 10.2.29 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
Active: failed (Result: exit-code) since Sat 2019-11-16 14:58:00 CET; 10ms ago
Docs: man:mysqld(8)
...
dpkg: error processing package mariadb-server (--configure):
dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.27-3ubuntu1) ...
No apport report written because the error message indicates its a followup error from a previous failure.
Processing triggers for systemd (237-3ubuntu10.31) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Errors were encountered while processing:
mariadb-server-10.2
mariadb-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@sonbahar:~#
PLEASE HELP ME.
REGARDS
@murat,
Such issues required investigation on the server.
Please contact our Support Team for assistance.
HI,
I have installed Obsidian and now some client has problem to import Database (utf8_unicode_520_ci). Your raccomended instruction ist to upgrade MariaDB.Questions:
- can I use with Obsidian and install from Red Hat Softwer Collection the MariaDB10.3?
- can I migrate MariaDB 5.5.64 direct to MariaDB 10.3? On RedHat Manual they raccomand to migrate to Version 10 at first and than to 10.3 https://access.redhat.com/documentation/en-us/red_hat_software_collections/3/html/3.3_release_notes/chap-migration
- can I use your instrution for Cento OS to migrate to MariaDB 10.3
Thanks in advice
Hi Gilberto,
For RedHat please follow their guide. Direct upgrade from 5.5 to 10.3 not recommended.
Hello, just upgraded my MariaDB from 5.5 to 10.3 on Plesk Obsidia 18.0.21 and it worked just great..Took me 5 minutes and all websites are working just fine and i believe faster. I upgraded because i believe that 5.5 was causing some freezes on some queries that included SELECT DISTINCT..That happened a lot of times lately, so i hope this gets fixed..i believe it was about Copying tmp tables, or Waiting for table lock isues
Hello Michael Zagaris
Glad to hear that all went well, thank you for the feedback.
I guess some of the steps are related to the change from mysql to mariadb, right?
If we consider that we are changing from mariadb 5.5 to mariadb 10.3, in Centos 7.7, could the summary of the steps be like I show below?
----------------------
MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin --all-databases --routines --triggers > /tmp/all-databases.sql
service mariadb stop
rpm -qa | grep mariadb
==> rpm -e --nodeps <other-mariadb-package>
cp -v -a /var/lib/mysql/ /var/lib/mysql_backup
rpm -q --whatprovides mariadb-server
rpm -e --nodeps `rpm -q --whatprovides mariadb-server`
vi /etc/yum.repos.d/MariaDB.repo
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.3/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
yum install MariaDB-server MariaDB-client
systemctl restart mariadb
MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin
systemctl restart mariadb
plesk sbin packagemng -sdf
--------------------------------------
My maridb related packages are:
plesk-libmariadbclient-3.0-3.0.9-1centos.7.190417.1743.x86_64
mariadb-libs-5.5.64-1.el7.x86_64
sw-mariadb-client-1.0.0-centos7.17031417.x86_64
mariadb-server-5.5.64-1.el7.x86_64
plesk-libmariadbclient-1.0-1.0.0-1centos.7.190329.1026.x86_64
mariadb-5.5.64-1.el7.x86_64
So I guess I don't need to uninstall any of them individually, right? I guess with the command "rpm -e --nodeps `rpm -q --whatprovides mariadb-server`" they will be uninstalled
If we follow all these steps, what should we do if something fails and we need to restore the previous version?
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.
First of all, thanks for the answer.
If it is not necessary to uninstall the current version of MariaDB (5.5), could I update MariaDB, instead of uninstalling the old version and installing the new one(10.3)?
I understood from some site that it was not recommended, and that it was better to uninstall version 5.5 and then install version 10.3. I don't know if that's true.
If an upgrade were possible, I suppose the steps would be:
-------------------------------------------------
MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump -u admin --all-databases --routines --triggers > /tmp/all-databases.sql
service mariadb stop
cp -v -a /var/lib/mysql/ /var/lib/mysql_backup
vi /etc/yum.repos.d/MariaDB.repo
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.3/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
yum -y upgrade maria*
systemctl restart mariadb
MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin
systemctl restart mariadb
plesk sbin packagemng -sdf
-----------------------------------------
Is this all right?
And, although a copy of the databases is made, with the dump and copy of the mysql folder, I am not very clear about the process to recover it in case of disaster. Uninstall MariaDB 10.3, remove the repo file, reinstall the default version of centos, restore mysql folder and then recover the dump? Would this be the right order? Is it necessary to restore the mysql folder or is it enough to recover the dump?
Thank you in advance
I am on debian 9 and i wish to upgrade mariadb to 10.3
Since message approval takes a long time, I tried to perform the actions I listed above, and some recommended from other sites, by uninstalling mariadb 5.5, just in case.
------------------------------------------------------
mysqldump -u admin -p`cat /etc/psa/.psa.shadow` --all-databases --routines --triggers > ~/backup/all-databases.sql
mysql -uadmin -p`cat /etc/psa/.psa.shadow` -B -e "SET GLOBAL innodb_fast_shutdown=0;"
systemctl stop monit.service
systemctl disable mariadb
systemctl stop mariadb
cp -v -a /var/lib/mysql/ /var/lib/mysql_backup
cp /etc/my.cnf ~/backup/
cp -v -a /etc/my.cnf.d/ ~/backup/
rpm -e --nodeps `rpm -q --whatprovides mariadb-server`
vi /etc/yum.repos.d/MariaDB.repo
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.3/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
yum install MariaDB-server MariaDB-client MariaDB-shared MariaDB-backup MariaDB-common
systemctl enable mariadb
systemctl restart mariadb
mysql_upgrade -uadmin -p`cat /etc/psa/.psa.shadow`
systemctl restart mariadb
plesk sbin packagemng -sdf
mysql -uadmin -p`cat /etc/psa/.psa.shadow` -B -e "SELECT VERSION();"
systemctl restart monit.service
------------------------------------------------------
And... apparently, everything's fine. All the websites are working as before... Good.
Hello Nerque
Thank you for the message, glad to hear everything went fine.
Hello Kingsley Felix
As I can see, you've already contacted our Professional Services for assistance!
Yes and am not interested anymore... $147 just to upgrade a DATABASE
Hello Kingsley Felix
Thank you for the feedback.
In that case, feel free to do it on your side, following steps from this article, as confirmed by other Pleskians, steps for 10.3 are identical.
the commands for debian 9 is FAILING, NOT FOUND ERROR.
# curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash -s -- --mariadb-server-version=mariadb-10.3
-bash: sudo: command not found
curl: (23) Failed writing body (360 != 1369)
Hello Kingsley,
Please install "sudo" command:
apt-get install sudo -y
Warning: MariaDB 10.3 is supported starting from Plesk Obsidian. Previous versions (Onyx and older) do not support MariaDB 10.3. For details, visit this link.
"this link" => https://support.plesk.com/hc/en-us/articles/360006201833 is a opps page!
Hello @WebITBuero
Thank you for bringing our attention on this. The article is updated.
I have followed this Article.
Everything went fine but the Mysql version still shows to be 5.5?
What did I do wrong?
Hello Rashid Qureshi,
Most probably, you haven't executed this command at the end:
# plesk sbin packagemng -sdf
Hi there!
Thanks for providing this, i used to update MariaDB 5.5.65 on CentOS 7 to MariaDB 10.3, latest stable supported by Plesk.
Everything went smoothly and no errors so far, however i didn't understand what you mean on the last step:
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.
What is " 'mysql' init script", is it an error message that appears on the SSH window, on Plesk, on an error log?
Should i run those final steps anyway?
# 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
Thanks!
Hello Necro
> What is " 'mysql' init script"
This is a leftover from previously installed MySQL server. Init script is a script for a service to start on boot.
> Should i run those final steps anyway?
The last step is required to make sure the processes of old MySQL version are stopped, to start MariaDB if not started, and to make sure that MariaDB will start after the server reboot. I would recommend not avoiding it.
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!
Hello Necro
It's recommended to stay with the configuration, predefined by Plesk.
Also, here're general recommendations for securing Plesk installation: https://support.plesk.com/hc/en-us/articles/115000626925
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
Hello Dennis
Please, try going to Tools & Settings > Plesk Components and click "Refresh".
In case this won't help, consider submitting a support request.
Hello, I just wanted to update MariaDB to version 10.3.23 under Debian 10. So far all good, after the installation there were errors on an apt --fix-broken install but results in:
dpkg: regarding .../mariadb-client-core-10.3_1%3a10.3.23+maria~buster_amd64.deb containing mariadb-client-core-10.3:
mariadb-client-10.3 conflicts with mysql-client-core-5.5
mariadb-client-core-10.3 provides mysql-client-core-5.5 and is to be installed.
dpkg: error processing archive /var/cache/apt/archives/mariadb-client-core-10.3_1%3a10.3.23+maria~buster_amd64.deb (--unpack):
conflicting packages - not installing mariadb-client-core-10.3
dpkg: regarding .../mariadb-client-10.3_1%3a10.3.23+maria~buster_amd64.deb containing mariadb-client-10.3:
mariadb-client-core-10.3 conflicts with mysql-client-5.5
mariadb-client-10.3 provides mysql-client-5.5 and is to be installed.
dpkg: error processing archive /var/cache/apt/archives/mariadb-client-10.3_1%3a10.3.23+maria~buster_amd64.deb (--unpack):
conflicting packages - not installing mariadb-client-10.3
Errors were encountered while processing:
/var/cache/apt/archives/mariadb-client-core-10.3_1%3a10.3.23+maria~buster_amd64.deb
/var/cache/apt/archives/mariadb-client-10.3_1%3a10.3.23+maria~buster_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Any ideas? If I look at https://packages.debian.org/search?lang=de&searchon=names&keywords=mysql-server-core, the package "mysql-server-core-5.5" for buster does not exist.
Hi Ivan
I think you mean Tools & Settings > Server Components? I tried that already but that doesn't resolve the issue unfortunately. I'll submit a support request instead. Cheers
Please sign in to leave a comment.