Articles in this section

How to upgrade MariaDB on Plesk for Linux

kb: how-to Plesk for Linux ABT: Group B

Applicable to:

  • Plesk for Linux

Question

How to upgrade MariaDB on Plesk for Linux?

Answer

In Plesk Obsidian 18.0.60 we have released our new tool in beta test to upgrade MariaDB to a supported LTS branch via Plesk User Interface. It checks configuration, performs DB backup, configures MariaDB package repositories, performs the upgrade, and runs necessary post-upgrade actions.

Starting from Plesk Obsidian 18.0.71, the feature is available for all Plesk Obsidian servers

Plesk UI

Note: This automatic tool is not available on CloudLinux. For this operating system proceed to the "Manual procedure".

  1. Login to Plesk UI as admin.
  2. Go to Tools & Settings > Database Servers page:
  3. Click the "Upgrade now" button.
  4. Feedback about this feature can be left using the following link.

Manual procedure

This section provides manual 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/10.11/11.4 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 administration 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.11 is supported starting from Plesk Obsidian 18.0.52. 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 table's 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/MariaDB upgrade at your own risk.

Before starting a MySQL/MariaDB upgrade, stop the WatchDog service if it is used on a server. Check its status with the service watchdog status command.

Note: MySQL/MariaDB 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:

Plesk on CentOS 8/AlmaLinux 8/AlmaLinux 9

By default, CentOS 8 is shipped with MariaDB 10.3.

  1. 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

  2. Stop MariaDB:

    # service mariadb stop

  3. Remove additional package conflicting with 10.4 version:

    # yum remove mariadb-gssapi-server

  4. For security reasons, copy the database directory in a separate folder:

    # cp -v -a /var/lib/mysql/ /var/lib/mysql_backup

  5. Configure MariaDB repository: open the Setting MariaDB repositories page, select your OS distro (for AlmaLinux 8 use RHEL 8), 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=1

    The configuration item module_hotfixes=1 is a workaround for what MariaDB told is a dnf bug. See MDEV-20673 for more details

    5.3. Save the changes and close the file.

  6. 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 it using the following command:

    # rpm -e --nodeps `rpm -q --whatprovides mariadb-server`

  7. Reset all the cache:

    # yum clean all

  8. Start an upgrade of MariaDB to 10.4:

    # yum install MariaDB-server galera-4 MariaDB-client MariaDB-shared MariaDB-backup MariaDB-common

  9. 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

  10. Once the upgrade is finished, start MariaDB:

    # systemctl restart mariadb

  11. Upgrade MySQL databases:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mariadb-upgrade -uadmin

  12. Restart mariadb service:

    # systemctl restart mariadb

  13. Execute this command to update the package version inside Plesk:

    # plesk sbin packagemng -sdf

  14. Restore SELinux context:

    # restorecon -v /var/lib/mysql/*

Plesk on CentOS 7 / RHEL 7

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.

  1. 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

  2. Execute the script via CLI:

    # ./c7-mariadb-10-5-upgrade.sh

Manual Method

  1. 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

  2. Stop MariaDB:

    # service mariadb stop

  3. Remove additional mariadb-bench package if installed:

    # rpm -e --nodeps mariadb-bench

  4. For security reasons, copy the database directory to a separate folder:

    # cp -v -a /var/lib/mysql/ /var/lib/mysql_backup

  5. 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 it using the following command:

    # rpm -e --nodeps `rpm -q --whatprovides mariadb-server`

  6. 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.26
     

    Note: Make sure that other MariaDB repositories are not enabled in /etc/yum.repos.d/.

  7. Reset all the cache:

    # yum clean all

  8. Start an upgrade of MariaDB:

    # yum install MariaDB-client MariaDB-server MariaDB-compat MariaDB-shared

  9. 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

  10. Start MariaDB:

    # systemctl restart mariadb

    OR

    # systemctl restart mysql

  11. Upgrade MySQL databases:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin

  12. Restart mysql service:

    # systemctl restart mariadb

    OR

    # systemctl restart mysql

  13. 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

Plesk on CloudLinux
  1. 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

  2. Stop the MySQL service:

    # systemctl stop mysqld

  3. Copy a database's directory to a separate folder like this (for backup purposes also):

    # cp -v -a /var/lib/mysql/ /var/lib/mysql_backup

  4. In case bind-address directive is present in /etc/my.cnf make sure that it is as follows :

    # bind-address = 127.0.0.1

  5. Start the MySQL service:

    # systemctl start mysqld

    • 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=MYSQL_VERSION

      Note: Where 'MYSQL_VERSION' has to be substituted with one of the following:
      mariadb102 for MariaDB v10.2
      mariadb103 for MariaDB v10.3
      mariadb104 for MariaDB v10.4
      mariadb105 for MariaDB v10.5
      mariadb106 for MariaDB v10.6
      mariadb1011 for MariaDB v10.11
      mariadb1104 for MariaDB v11.4
      mysql56 for MySQL v5.6
      mysql57 for MySQL v5.7
      mysql80 for MySQL v8.0
      mysql84 for MySQL v8.4
      As for now MariaDB v11.8 is not supported by mysqlgovernor.py

      Note: where 'MYSQL_VERSION' is the target database server version that should be replaced with the value from the table above. The upgrade should proceed in series, for example, for MariaDB 10.1 to 10.3:
      10.1 → 10.2;
      10.2 → 10.3.
      More information can be found here. If there is an issue with Governor, Cloudlinux support should be contacted for further support.

  6. 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

  7. Restart MySQL/MariaDB:

    # systemctl restart mysql

  8. Upgrade MySQL/MariaDB databases:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin

  9. Restart MySQL:

    # systemctl restart mysql

  10. Execute the following command to update package version inside Plesk:

    # plesk sbin packagemng -sdf

Plesk on Debian 9

Debian 9 is basically shipped with MariaDB. MariaDB 10.x version is a drop-in replacement for MySQL 5.5/5.6/5.7

  1. 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

  1. 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.2

    If the installation fails with unmet dependencies:

    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 installed

    Run the command below to correct them:

    # apt --fix-broken install

  2. Check MySQL/MariaDB version:

    # mysql -V
    mysql Ver 15.1 Distrib 10.2.19-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

  3. Start the MariaDB service:

    # systemctl start mariadb

    Note: It may be already started

  4. Upgrade MySQL/MariaDB databases:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin

  5. Restart MySQL/MariaDB service:

    # systemctl restart mariadb

  6. Execute the following command to update package version inside Plesk:

    # plesk sbin packagemng -sdf

Plesk on Debian 10/Debian 11

By default, Debian 10 is shipped with MariaDB 10.3.

  1. 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

  2. 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.

  1. 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.4

  2. Create a backup of all MySQL/MariaDB data:

    # cp -v -a /var/lib/mysql/ /var/lib/mysql_backup

  3. 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:

    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

    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 installable

    Run the command below to correct them:

    # apt --fix-broken install

  4. Adjust the /etc/mysql/my.cnfand/or /etc/mysql/mariadb.conf.d/50-server.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

    # sed -i 's/bind-address = ::ffff:127.0.0.1/bind-address = 127.0.0.1/g' /etc/mysql/mariadb.conf.d/50-server.cnf

  5. Start the MariaDB service:

    # systemctl start mariadb.service

  6. Upgrade MySQL/MariaDB databases:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin

  7. Restart MySQL/MariaDB service:

    # systemctl restart mariadb

  8. Execute the following command to update package version inside Plesk:

    # plesk sbin packagemng -sdf

Plesk on Ubuntu 18.04

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:

  1. 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

  2. Stop the MariaDB service:

    # systemctl stop mariadb

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.

  1. 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

  2. Create a backup of all MySQL/MariaDB data:

    # cp -v -a /var/lib/mysql/ /var/lib/mysql_backup

  3. 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

  4. Start the MariaDB service:

    # systemctl start mariadb

  5. Upgrade MySQL/MariaDB databases:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin

  6. Restart MySQL/MariaDB service:

    # systemctl restart mariadb

  7. Execute the following command to update package version inside Plesk:

    # plesk sbin packagemng -sdf

Plesk on Ubuntu 20.04/Ubuntu 22.04

By default, Ubuntu 20.04 is shipped with MariaDB 10.3 and Ubuntu 22.04 with MariaDB 10.6.

  1. 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

  2. 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.

  1. 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

  2. Create a backup of all MySQL data:

    # cp -v -a /var/lib/mysql/ /var/lib/mysql_backup

  3. 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

  4. 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

  5. Start the MariaDB service:

    # service mariadb start

  6. Upgrade MySQL/MariaDB databases:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin

  7. Restart mysql service:

    # service mariadb restart

  8. Execute the following command to update package version inside Plesk:

    # plesk sbin packagemng -sdf

More information available in MySQL documentation at http://dev.mysql.com/.

Was this article helpful?

Comments

89 comments
Date Votes
  • Michel CLAR  instead of [DatabaseManagement]
     please go for [databaseManagement]
     

    1
  • Worked in a very short time.
    “d” instead of “D” in “databaseManagement” was the solution
    Thanks for helping so efficiently

    1
  • Hello,
    I have a problem in the repository : mariadb.list
    E: The repository 'https://dlm.mariadb.com/repo/maxscale/latest/apt buster Release' no longer has a Release file.
    Some time ago I had manually updated the version of mariadb to 10.11 with one of your methods. It seems to me that the article has been replaced by the automatic method.
    /etc/apt/sources.list.d/mariadb.list
    deb [arch=amd64,arm64] https://dlm.mariadb.com/repo/maxscale/latest/apt buster main
    I can't find the right repository.
    Can you help me?
    Product version: Plesk Obsidian 18.0.67.0
    OS version: Debian 10.13 x86_64
    Thank you a lot,

    0
  • For your info, after upgrading to MariaDB 11.4 on Debian 12, the various “mysql” commands don't exist anymore (reproduced 3 times).

    Since we need them for many things still, you have to re-create symlinks manually.

    Here they are:

    ln -s mariadb /usr/bin/mysql
    ln -s mariadb-convert-table-format /usr/bin/mysql_convert_table_format
    ln -s mariadb-find-rows /usr/bin/mysql_find_rows
    ln -s mariadb-fix-extensions /usr/bin/mysql_fix_extensions
    ln -s mariadb-install-db /usr/bin/mysql_install_db
    ln -s mariadb-plugin /usr/bin/mysql_plugin
    ln -s mariadb-secure-installation /usr/bin/mysql_secure_installation
    ln -s mariadb-setpermission /usr/bin/mysql_setpermission
    ln -s mariadb-tzinfo-to-sql /usr/bin/mysql_tzinfo_to_sql
    ln -s mariadb-upgrade /usr/bin/mysql_upgrade
    ln -s mariadb-waitpid /usr/bin/mysql_waitpid
    ln -s mariadb-access /usr/bin/mysqlaccess
    ln -s mariadb-admin /usr/bin/mysqladmin
    ln -s mariadb-check /usr/bin/mysqlanalyze
    ln -s mariadb-binlog /usr/bin/mysqlbinlog
    ln -s mariadb-check /usr/bin/mysqlcheck
    ln -s mariadbd-multi /usr/bin/mysqld_multi
    ln -s mariadbd-safe /usr/bin/mysqld_safe
    ln -s mariadbd-safe-helper /usr/bin/mysqld_safe_helper
    ln -s mariadb-dump /usr/bin/mysqldump
    ln -s mariadb-dumpslow /usr/bin/mysqldumpslow
    ln -s mariadb-hotcopy /usr/bin/mysqlhotcopy
    ln -s mariadb-import /usr/bin/mysqlimport
    ln -s mariadb-check /usr/bin/mysqloptimize
    ln -s mariadb-check /usr/bin/mysqlrepair
    ln -s mariadb-report /usr/bin/mysqlreport
    ln -s mariadb-show /usr/bin/mysqlshow
    ln -s mariadb-slap /usr/bin/mysqlslap
    0
  • Olivier  do you see the Manual Procedure section? Could you please specify which step is returning an error?

    0
  • LRob.fr Web Hosting i followed the following section and there were no issues with the symlinks:

    root@10-69-45-223:~# ls -l /usr/bin/mysql*
    lrwxrwxrwx 1 root root  7 Jan 30 18:03 /usr/bin/mysql -> mariadb
    lrwxrwxrwx 1 root root 28 Jan 30 18:03 /usr/bin/mysql_convert_table_format -> mariadb-convert-table-format
    lrwxrwxrwx 1 root root 17 Jan 30 18:03 /usr/bin/mysql_find_rows -> mariadb-find-rows
    lrwxrwxrwx 1 root root 22 Jan 30 18:03 /usr/bin/mysql_fix_extensions -> mariadb-fix-extensions
    lrwxrwxrwx 1 root root 18 Jan 30 18:03 /usr/bin/mysql_install_db -> mariadb-install-db
    lrwxrwxrwx 1 root root 14 Jan 30 18:03 /usr/bin/mysql_plugin -> mariadb-plugin
    lrwxrwxrwx 1 root root 27 Jan 30 18:03 /usr/bin/mysql_secure_installation -> mariadb-secure-installation
    lrwxrwxrwx 1 root root 21 Jan 30 18:03 /usr/bin/mysql_setpermission -> mariadb-setpermission
    lrwxrwxrwx 1 root root 21 Jan 30 18:03 /usr/bin/mysql_tzinfo_to_sql -> mariadb-tzinfo-to-sql
    lrwxrwxrwx 1 root root 15 Jan 30 18:03 /usr/bin/mysql_upgrade -> mariadb-upgrade
    lrwxrwxrwx 1 root root 15 Jan 30 18:03 /usr/bin/mysql_waitpid -> mariadb-waitpid
    lrwxrwxrwx 1 root root 14 Jan 30 18:03 /usr/bin/mysqlaccess -> mariadb-access
    lrwxrwxrwx 1 root root 13 Jan 30 18:03 /usr/bin/mysqladmin -> mariadb-admin
    lrwxrwxrwx 1 root root 13 Jan 30 18:03 /usr/bin/mysqlanalyze -> mariadb-check
    lrwxrwxrwx 1 root root 14 Jan 30 18:03 /usr/bin/mysqlbinlog -> mariadb-binlog
    lrwxrwxrwx 1 root root 13 Jan 30 18:03 /usr/bin/mysqlcheck -> mariadb-check
    lrwxrwxrwx 1 root root 14 Jan 30 18:03 /usr/bin/mysqld_multi -> mariadbd-multi
    lrwxrwxrwx 1 root root 13 Jan 30 18:03 /usr/bin/mysqld_safe -> mariadbd-safe
    lrwxrwxrwx 1 root root 20 Jan 30 18:03 /usr/bin/mysqld_safe_helper -> mariadbd-safe-helper
    lrwxrwxrwx 1 root root 12 Jan 30 18:03 /usr/bin/mysqldump -> mariadb-dump
    lrwxrwxrwx 1 root root 16 Jan 30 18:03 /usr/bin/mysqldumpslow -> mariadb-dumpslow
    lrwxrwxrwx 1 root root 15 Jan 30 18:03 /usr/bin/mysqlhotcopy -> mariadb-hotcopy
    lrwxrwxrwx 1 root root 14 Jan 30 18:03 /usr/bin/mysqlimport -> mariadb-import
    lrwxrwxrwx 1 root root 13 Jan 30 18:03 /usr/bin/mysqloptimize -> mariadb-check
    lrwxrwxrwx 1 root root 13 Jan 30 18:03 /usr/bin/mysqlrepair -> mariadb-check
    lrwxrwxrwx 1 root root 14 Jan 30 18:03 /usr/bin/mysqlreport -> mariadb-report
    lrwxrwxrwx 1 root root 12 Jan 30 18:03 /usr/bin/mysqlshow -> mariadb-show
    lrwxrwxrwx 1 root root 12 Jan 30 18:03 /usr/bin/mysqlslap -> mariadb-slap

    Most likely the symlinks were broken from before. If you still wish us to investigate please open a support ticket with us https://support.plesk.com/hc/en-us/articles/12377663472791-How-to-submit-a-request-to-Plesk-support

     

    0
  • Hi @Julian Bonpland Mignaquy
    Thanks for your feedback.
    When I did the manual procedure a few months ago, I didn't see any errors.
    Recently, I wanted to install the new version of imunify and I noticed this error.
    If I do an apt-get update, the error is still there.
    Here is mariadb.list complete
    # MariaDB Server
    # To use a different major version of the server, or to pin to a specific minor version, change URI below.
    deb [arch=amd64,arm64] https://dlm.mariadb.com/repo/mariadb-server/10.11/repo/debian buster main
    # MariaDB MaxScale
    # To use the latest stable release of MaxScale, use "latest" as the version
    # To use the latest beta (or stable if no current beta) release of MaxScale, use "beta" as the version
    deb [arch=amd64,arm64] https://dlm.mariadb.com/repo/maxscale/latest/apt buster main
    # MariaDB Tools
    deb [arch=amd64] http://downloads.mariadb.com/Tools/debian buster main
    Many Thanks

    0
  • @Julian Bonpland Mignaquy 

    Like I said, I've reproduced this issue on 3 installs, latest one was a fresh Debian 12 from Hetzner (dedicated) with Plesk just installed (that installed MariaDB 10.4 itself in the first place).
     

    After upgrading, the symlinks are not there anymore. It is to be noted that I upgrade MariaDB myself with “apt” by updating the repos using the official MariaDB script, not the automated script way from Plesk.

    Ultimately, MariaDB even warns you about the “mysql” command being deprecated, after adding the symlinks.

    root@srv02 ~ # mysql -V
    mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead
    mysql from 11.4.5-MariaDB, client 15.2 for debian-linux-gnu (x86_64) using  EditLine wrapper

     

    Since I've resolved the issue myself I won't take the time ot open a support ticket, but I invite you to dig a bit more, as the issue is consistent, and due to MariaDB's policy that wishes to remove “mysql” commands.

    0
  • Hi LRob.fr Web Hosting  yes upgrading to 11.4 is not supported by the automatic script. You need to follow the manual procedure:

    Please try our Manual procedure and let us know,

    0
  • Olivier Could you please open a support ticket with us in order to troubleshoot directly on the server? https://support.plesk.com/hc/en-us/articles/12377663472791-How-to-submit-a-request-to-Plesk-support

    1
  • Julian Bonpland Mignaquy  It appears you forgot what the topic was about. I don't need support, it is clear that I already upgraded manually 3 times. It worked OK for me (I've been +10 years sysadmin, this is routine). But I'm telling you MariaDB is deprecating “mysql” based commands on which Plesk relies on, therefore the symlinks are getting removed, at least on Debian based systems. So that is something Plesk needs to look carefully. That's all I'm saying.

    1
  • Hi,
    @Julian Bonpland Mignaquy 
    I forgot to specify, I have the same problem on two servers.
    I had performed the manual procedure because the automatic procedure did not exist before.
    I cannot open a support ticket because my license was purchased via my host OVH. I did not know this condition.
    I found this link:
    https://talk.plesk.com/threads/maria-db-update-fail-autoupdate-no-longer-works.374503/page-2
    What do you think?
    Cordialy,

    1
  • Hi Olivier  please open a support ticket with OVH, they will most likely escalate with us in order to investigate this on your servers.

    1
  • CloudLinux 7.9 with MariaDB 10.3 upgrade to 10.4 didn't go smoothly.

    Error: "Enabled repositories check http://yum.mariadb.org/10.3/centos7-amd64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found Trying other mirror. It looks like you encountered an issue when performing the operation. Please check if the issue related to CloudLinux repositories. Usually our repositories contain "cloudlinux" word in their name. If it does, check our knowledgebase for a possible solution or contact support: https://www.cloudlinux.com/support-portal/ In other cases, please contact your system administrator to fix the issue. Unable to create yum cache for 'mariadb' OS repository. Make sure the repository is available, otherwise either disable it or fix its configuration, then try again."

    Eventually I found a fix (yeah didn't have a major panic in the meantime) 
    Used this NOT recommended fix to fix this but that worked thank the stars.

    https://support.plesk.com/hc/en-us/articles/12376955888919-Plesk-or-system-update-fails-on-Linux-http-yum-mariadb-org-10-1-centos7-amd64-repodata-repomd-xml-Errno-14-HTTP-Error-404-Not-Found

     

    1
  • CentOS 7 reached end of life (EOL) on June 30, 2024. Move to some newer OS.

    -1
  • I have CENTOS 7 / MairaDB 10.2.44 / Plesk Obsidian 18.0.68 Web Host Edition.  I want to upgrade my MairaDB 10.2.44 to 10.5 or higher.  Are these steps mentioned above sufficient to upgrade MairaDB on the server? Can I rely on these steps? Or should I have to take care of anything else?  I have to follow manual steps as I am not getting any auto-update link on my database dashboard.

    0
  • Hi Info  yes you can go ahead and start with the automatic procedure.

    0
  • I am not getting automatic procedure link on my database dashboard. Even I have updated the panel.ini

    0
  • Hi Info  please show me the output of:

    cat /usr/local/psa/admin/conf/panel.ini

    0
  • Panel.ini

    --------------

    ; Plesk initialization file
    ;
    ; Notes:
    ; * Be careful and understand what do you do while modifying of panel behavior.
    ; * If option is missed default value will be used.
    ; * Use ";" for comments. 
    ; * Enabled debug mode or high log level can be the reason of panel slowdown.

    [debug]

    ; Enable debug mode (do not use in production environment)
    ;enabled = on

    [log]

    ; Log messages verbosity level (from 0 to 7)
    ; 0 - only critical errors, 7 - all including debug messages, default - 3
    ;filter.priority = 7

    ; Enable logging of SQL queries
    ;show.sql_query = on

    ; Enable logging of external utilities calls
    ;show.util_exec = on

    ; Enable logging of stdin and stdout for external utilities calls (do not use in production environment)
    ;show.util_exec_io = on

    ; Enable logging of APSC activities
    ;apsc.enabled = on

    [aps]

    ; Disable APS apps at all
    ;enabled = off

    [locale]

    ; Show locale keys instead of localized string (values: off, on, long)
    ;showKeys = long

    [help]

    ; Documentation URL
    ;url = http://example.com

    [promos]

    ; Disable other products promotions
    ;enabled = off

    [facebook]

    ; Hide Like link
    showLikeLink = off

    [rating]

    ; Hide feedback dialog with question to rate product
    ;enabled = off

    [cli]

    ; Ignore nonexistent options in command line interface
    ;ignoreNonexistentOptions = off

    [pmm]

    ; Allow to upload modified, corrupted, created on another server or in an older Panel version
    ; that does not support signing of backups. Set this option only if you trust to backup creator because upload of modified
    ; backup may compromise you server. If value is on then users just informed about changes in backup and restore isn`t blocked
    ; Values: on, off
    ;allowRestoreModifiedDumps = off

    [ext-social-login]
    google.enabled = off
    facebook.enabled = off
    github.enabled = off

    [ext-letsencrypt]
    renew-before-expiration = 45
    rsa-key-size = 4096

    #[ext-grafana]
    allowSuperAdmin=true

    [extensions]
    blacklist = laravel,nodejs

    [ext-performance-booster]
    enabled = 1

    [databaseManagement]
    features.canBeUpgraded = 1

    [ext-monitoring]
    cloudIntegrationMode = hidden

    [ext-platform360]
    showIndicator = off

    [ext-wp-toolkit]
    ;wpCliTimeoutRegularTimeout = 180
    wpCliTimeoutHeavy = 3600
    wpCliTimeoutMedium = 600
    wpCliTimeoutRegular = 600
    wpCliTimeoutMaintenanceTimeout = 360
     

    0
  • I wish the article could provide more info about issues may arise during the upgrade process.
    I have this issue blocking upgrade process, Restarting MySQL server ... Running mysqlcheck ... cloudfil_cloud.user_level warning  : Found row where the auto_increment column has the value 0 The command exit code: 0

    1
  • Hi linuxman1  we cannot provide info for issues for all servers. They are always highly customized and we will end up with a lot of information in one article.

    We do have it documented:

    The AUTO_INCREMENT columns start from 1 by default according to MariaDB's official source. However, some 3rd party software due to its internal logic creates tables with IDs starting from 0.

    For example:

    MariaDB [db_name]> select id from table_name;
    +--+
    | id |
    +--+
    | 0 |
    | 1 |
    | 2 |
    | 3 |

    Please use the Manual Procedure.

     

    0
  • Hi:

    In the last version of update of mariadb 11.4, the proccess create a new repository of mariadb, but put the name _old, and after the update, apt have this problem:

    N: Ignoring file 'mariadb.list.old_1' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
    Do you want to continue? [Y/n] N


    Can you modify the script of automatic update of mariadb in plesk and delete this repo when finish the update?

    Regards!

    0
  • Hello, 
    Thank you for bringing this to our attention! I've reproduced this behavior and reported it to the Plesk development team.

    1
  • Hello Sistemas CQM 
    This is an addition to my previous comment. Plesk development team investigated the situation with mariadb.list.old file. It appeared that the file is created by the MariaDB update script itself. 

    local suffix=0
    while [[ -e $outfile.old_$((++suffix)) ]]; do :; done
    msg warning "Found existing file at $outfile. Moving to $outfile.old_$suffix"
    if ! mv "$outfile" “$outfile.old_$suffix”

    Here is where the script can be downloaded: 
    https://mariadb.com/docs/server/server-management/install-and-upgrade-mariadb/installing-mariadb/binary-packages/mariadb-package-repository-setup-and-usage 

    This is considered a cosmetic issue. When the script will be changed by MariaDB developers, it will also be changed in Plesk. 
    Thank you for your report!

    1
  • I got this from the pre-flight tests:

    Analyzing the package manager configuration Analyzing databases with mysqlcheck Restarting MySQL server ... Running mysqlcheck ... mysql.db error : Key in wrong position at page 8192 error : Corrupt The command exit code: 0

    0
  • Is anyone else experiencing this error when updating from the dashboard?

    MariaDB download URL 'https://downloads.mariadb.com/MariaDB/' cannot be accessed: curl: (22) The requested URL returned error: 521 If you believe this is a temporary error, please try again later. Otherwise ensure that the URL is accessible from the server. For example, check your DNS, firewall, and /etc/hosts configuration.

    0
  • Tr3 Mendo hi! we are aware of this issue and we are waiting for MariaDB to fix it from their side.

    0

Please sign in to leave a comment.