How to upgrade MySQL/MariaDB on Linux

Follow

Comments

14 comments

  • Avatar
    Artur Beqiraj

    i have centos 7 end plesk Onyx end i need to have mariaDB 10.0.27 is possible ?

    Is there any way to get this version?

    thanks

  • Avatar
    Alexandr Tumanov

    Hello @Artur Beqiraj

    We recommend upgrading to MariaDB 10.1 at least. There is no significant difference, however, it will be easier to install MariaDB 10.1 or 10.2

  • Avatar
    Artur Beqiraj

    Hello Alexandr and thank you for your reply

    But I have a soft who works only with mysql 5.6 or MariaDB 10.0.27

    For this reason i am using the cpanel
    But I'm not practical with it, Because I've always used plesk on my servers. Your article
    gives you the opportunity to upgrate but if I changed the url to

    baseurl = http://yum.mariadb.org/10.2/centos7-amd64 in /10.0.27/  run into errors 

    for this reason i ask you

    thanks

  • Avatar
    Peter Jablonski (Edited )

    It didn't work for me in 100%.

    I was upgrading MySQL 5.1 to 5.7 om my CentOS 6 and I couldn't start mysql.

    # service mysqld start - gave me nothing, even no single line in /var/log/mysqld.log.

     

    What I did:

    1. I started mysql service from a file /usr/sbin/msqld to check what a problem was

    2. The problem was in config file /etc/my.cnf

    [ERROR] unknown variable 'innodb_additional_mem_pool_size=500K'

    I had to comment this line.

    3. After that I had a problem with access to the user table. 

    [ERROR] Fatal error: mysql.user table is damaged. Please run mysql_upgrade.

    mysqld --skip-grant-tables - it starts without reading the user table

    mysql_upgrade - then I could upgrade my tables

    killall mysqld - killing all the mysql instances

    4. Finally 

    # service mysqld start

  • Avatar
    Peter Debik

    MariaDB 10.2 is not yet officially supported. It is not causing issues in the panel, but the database repair tool claims that some date/timestamp fields are misconfigured, and it is unable to repair them. It would be good to add a check in the installation routines of Plesk to prohibit an installation on MariaDB 10.2. I only "accidentally" installed it on a 10.2 and found out about the wrong version in a recent support ticket.

  • Avatar
    Artyom Baranov

    @Peter Jablonski,

    Direct upgrade of MySQL 5.1 to MySQL 5.6/5.7 will damage tables (There is the warning message at the top of this article).

    It's strongly recommended to upgrade to MySQL 5.5 at first.

  • Avatar
    Definedhostinguk

    was upgrade from 5.5 to 5.7 on centos 6.9 and was getting mysql daemon failed to start when trying to restart mysql. Trawled through the web and finally came to a really quick fix. 

    # mysqld_safe

  • Avatar
    Vitaly Zhidkov

    @Artur, in case you need some specific version of MariaDB, you can specify it in repository configuration file in baseurl. For 10.0.27 for CentOS 7 it will be http://yum.mariadb.org/10.0.27/centos7-amd64

  • Avatar
    Vitaly Zhidkov

    @Definedhostinguk this can be only a workaround, not a fix. Check the /var/log/mysqld.log for error messages and search for articles in our Help Center

  • Avatar
    Bulat Tsydenov

    @Peter It would be great if you provide your suggestion on our Plesk User Voice. Thank you!

  • Avatar
    Jonathan (Edited )

    I run CentOS Linux 7.3.1611 with Plesk Onyx v17.5.3_build1705170317.16. In Plesk I see there's a MySQL server running with 5.5.52-MariaDB, which I want to upgrade. But the command service mariadb stop returns 'mariadb' is not a command. Furthermore, when I run yum repolist I don't see any mariadb or mysql at all. I'm quite new at this. What am I doing wrong?

  • Avatar
    Bulat Tsydenov

    @Jonathan instead of 'service mariadb stop' you can try to run 'systemctl stop mariadb.service'. As for 'yum repolist', as it is described in "For CentOS 7" section of this article, make sure you create `/etc/yum.repos.d/MariaDB10.1.repo` file with the corresponding content.

  • Avatar
    Artur Beqiraj

    @Vitaly Zhidkov 

    i have specific it but dont work so does not successfully complete the installation

  • Avatar
    Artyom Baranov

    @Artur Beqiraj,

    I have checked your previous post carefully and found that you are trying to install MariaDB 10.0.27 from the repository on MariaDB 10.2:

    baseurl = http://yum.mariadb.org/10.2/centos7-amd64

    Try to use the following link for baseurl instead:

    baseurl = http://yum.mariadb.org/10.0.27/centos7-amd64

Please sign in to leave a comment.