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
221 comments
Hello @Rashid.
Please make sure that /etc/yum.repos.d/MariaDB.repo contained the following line:
baseurl = http://yum.mariadb.org/10.2/centos7-amd64
and repeat the installation.
If you still unable to install MariaDB 10.x - submit a ticket to us https://support.plesk.com/hc/en-us
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.
@Steve Yates
I was able to check what you mentioned after upgrading to MariaDB 10.2.1. After running "yum updates" (to get to 10.2.25) the file /etc/init.d/mysql was recreated but it did not affect the service after reboot. After I rebooted, mariadb was running and mysql was not.
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.
@Steve Yates
I tested on CentOS 7 and tried the same thing as you and MariaDB service does not fail. I recommend opening a ticket with our support team.
Hi Julian, finally got around to installing updates. Updated 3 Plesk servers tonight that had MariaDB 10.2. One did not have /etc/init.d/mysql, but the other two did, both files dated June 14. One of those had MariaDB 10.2.24 installed June 21, the other on June 19. I updated all (yum update) and none of the three had file /etc/init.d/mysql afterwards. Maybe MariaDB changed/fixed the update, who knows. I'll let it go for now and maybe open a ticket if it ever recurs.
Hello @Steve,
Thank you for the information.
is there a possibility to roll back to the previous MariaDB version if any part of the install fails? Im on CentOS 7, MariaDB 5.5.6 and am a little hesitant to go ahead as we have 10+ Wordpress installs on the server
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.
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!
This article solved my problem, thanks.
Using Plesk ONYX and CENTOS 7 I had previously upgraded to MariaDB 10.2 with the help of this post. Now I have installed Plesk Obsidian and wanted to upgrade to MariaDB 10.3 since it's compatible, and I was wondering if the procedure to do that would be the same as described here or I need to refer to another procedure to upgrade to MariaDB 10.3 on Obsidian. Will appreciate information.
Hello @Rashid,
The procedure is the same.
Also, recommend making the server snapshot before the upgrade in case something goes wrong.
I updated from mairadb 10.2 to 10.3 with the updated plesk 18x
Unfortunately i cant connect to ODBC anymore.
/etc/mysql/my.cnf still has bind-address = 0.0.0.0
I followed https://support.plesk.com/hc/en-us/articles/115002983385-Unable-to-connect-remotely-to-MySQL-on-a-Plesk-server-Connection-refused
how to get this back?
@Robert. Thanks a lot. This is really a helpful information.
Regards
@Robert
Additional investigation is required.
As I can see, you've previously had tickets submitted to us, please create a ticket regarding this issue.
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
Hi @Hopjanj,
Since MariaDB 10.2
default-tmp-storage-engine
(in MySQL calledinternal_tmp_disk_storage_engine
) was changed from MyISAM to InnoDB, which has certain limitations.In general, you may ignore the above warning.
However, to avoid any potential issues with others (not Plesk) databases:
default-tmp-storage-engine
back to MyISAM in[mysqld]
section of/etc/my.cnf
using text editor:# grep default-tmp-storage-engine /etc/my.cnf
default-tmp-storage-engine=MyISAM
# service mariadb restart
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"
Dryx Emerson please take a look at the following article https://support.plesk.com/hc/en-us/articles/213409469-Database-backup-in-Plesk-fails-because-of-missing-MySQL-user-The-user-specified-as-a-definer-does-not-exist
And also make sure that you did not upgrade to a non-supported Mariadb such as 10.4 in /etc/yum.repos.d/MariaDB.repo.
Have to say, after procrastinating about upgrading to MariaDB10.3 from 5.5 using this guide I dont know what i was worrying about. It took less than 90 seconds!! Thanks Robert Asilbekov
This morning I made an update from MariaDB Version 10.1.41 to 10.1.42 via the Plesk back-end. The update crashes the whole MySQL Server. I'm on Plesk 18.8.11 and CentOS 7.7.
When doing the update I get the following error message:
After searching, I found the following article: https://support.plesk.com/hc/en-us/articles/360000331033-Errors-during-Plesk-Update-ERROR-Zend-Db-Adapter-Exception-SQLSTATE-HY000-2002-No-such-file-or-directory-
Which I did follow and also the second linked article (this one here). I removed the old installation and installed MariaDB 10.1.42 with not success. When trying to start the mariaDB service the following message appears:
● mariadb.service - MariaDB 10.1.42 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: activating (auto-restart) (Result: signal) since Wed 2019-11-06 09:50:05 CET; 3s ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Process: 5979 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION (code=killed, signal=ABRT)
Process: 5928 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSITION=$VAR || exit 1 (code=exited, status=0/SUCCESS)
Process: 5926 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Main PID: 5979 (code=killed, signal=ABRT)
Nov 06 09:50:05 s20706067 systemd[1]: Failed to start MariaDB 10.1.42 database server.
Nov 06 09:50:05 s20706067 systemd[1]: Unit mariadb.service entered failed state.
Nov 06 09:50:05 s20706067 systemd[1]: mariadb.service failed.
I repeated the step again, with no success. I then did finally a try to install MariaDB 10.2.x. The same.
Please help me, to solve this problem.
PS. Could it be, that I installed the MariaDV Version 10.1.x via cli and now - for the first time - I tried to update the sql-server via Plesk back-end?
Thx Alexander
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:
Dear Ivan, thank you soooo much helping. This solved it, even the upgrade to 10.2.27 is now working.
What do I do in the meantime to prevent MariaDB from being updated to the wrong version?
thx Alexander
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
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
Hi Alexandr, these packages are in a yum cache, while MariaDB removed them from repositories. Just clean cache with `yum clean all` and it should be all right then.
Hi Anton,
thanks for that! It helped.
Alexander
Fixes are already available. See the Changelog of 10.1.43
Again, thanks for your quick help.
Alexander
Hello,
After upgrading to MariaDB 10.2 I updated plesk to 18.0.20 and trhen I can´t update components, i have tis error:
Fatal error during packages installation: [u'ERROR with transaction check vs depsolve:', 'plesk-mysql-server >= 18.0 is needed by pp18.0.20-bootstrapper-18.0-2.centos.7+p18.0.20.2+t191101.1317.x86_64']
YumRPMCheckError: [u'ERROR with transaction check vs depsolve:', 'plesk-mysql-server >= 18.0 is needed by pp18.0.20-bootstrapper-18.0-2.centos.7+p18.0.20.2+t191101.1317.x86_64']
I installed plesk-mysql-server from repo PLESK_17_5_3 dist like here:
https://support.plesk.com/hc/en-us/articles/360004026073-Unable-to-upgrade-Plesk-with-Percona-mariadb-server-5-0-60-is-needed-by-plesk-mysql-server
Can you help me?? Thank you in advance.
Please sign in to leave a comment.