How to upgrade MySQL 5.5 to 5.6/5.7 or MariaDB 5.5 to 10.0/10.1/10.2 on Linux?

Follow

Comments

129 comments

  • Avatar
    Anzhelika Khapaknysh

    Hi @Roberto,

    I'd recommend contacting our Support Team for assistance. They will check this issue in details

    0
    Comment actions Permalink
  • Avatar
    murat (Edited )

    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

    0
    Comment actions Permalink
  • Avatar
    Anzhelika Khapaknysh

    @murat,

    Such issues required investigation on the server.

    Please contact our Support Team for assistance.

    0
    Comment actions Permalink
  • Avatar
    Gilberto

    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

     

    0
    Comment actions Permalink
  • Avatar
    Anton Maslov

    Hi Gilberto,


    For RedHat please follow their guide. Direct upgrade from 5.5 to 10.3 not recommended.

    0
    Comment actions Permalink
  • Avatar
    Michael Zagaris

    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

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello Michael Zagaris

    Glad to hear that all went well, thank you for the feedback.

     

    0
    Comment actions Permalink
  • Avatar
    Nerque

    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?

     

    0
    Comment actions Permalink
  • Avatar
    Julian Bonpland Mignaquy

    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.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request