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

101 comments

  • Avatar
    Alexey Lapshin

    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

    0
    Comment actions Permalink
  • Avatar
    Steve Yates

    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.

    0
    Comment actions Permalink
  • Avatar
    Julian Bonpland Mignaquy

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

    0
    Comment actions Permalink
  • Avatar
    Steve Yates

    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.

    0
    Comment actions Permalink
  • Avatar
    Julian Bonpland Mignaquy

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

    0
    Comment actions Permalink
  • Avatar
    Steve Yates

    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.

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello @Steve,

    Thank you for the information.

    0
    Comment actions Permalink
  • Avatar
    Christopher-James Sheppard

    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

    0
    Comment actions Permalink
  • Avatar
    Maxim Krasikov

    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.

    0
    Comment actions Permalink
  • Avatar
    Learning Curve

    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!

    0
    Comment actions Permalink
  • Avatar
    Omotere Lanre Ebenezer

    This article solved my problem, thanks.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request