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

20 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
  • Avatar
    Artur Beqiraj

    Artyom Baranov

    i have specific but has in this error after instalation 

     

    Transaction check error:
    file /etc/init.d/mysql conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
    file /etc/my.cnf.d/server.cnf conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
    file /usr/bin/aria_chk conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
    file /usr/bin/aria_dump_log conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
    file /usr/bin/aria_ftdump conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
    file /usr/bin/aria_pack conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
    file /usr/bin/aria_read_log conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
    file /usr/bin/innochecksum conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
    file /usr/bin/my_print_defaults conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
    file /usr/bin/myisam_ftdump conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
    file /usr/bin/myisamchk conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
    file /usr/bin/myisamlog conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
    file /usr/bin/myisampack conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
    file /usr/bin/mysql_tzinfo_to_sql conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
    file /usr/bin/mysql_upgrade conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64
    file /usr/bin/mysqlbug conflicts between attempted installs of MariaDB-server-10.0.27-1.el7.centos.x86_64 and MariaDB-Galera-server-10.0.27-1.el7.centos.x86_64

  • Avatar
    Artyom Baranov

    Artur Beqiraj@

    Hello! Such issue may appear if you have enabled additional repository from which MariaDB can be installed.

    Or, MariaDB has already been installed from another repository which conflicts with the one provided earlier.

    If my first suggestion is correct, just disable that additional repository.

    If the second suggestion is correct, I recommend contacting our Professional Service.

  • Avatar
    Keith Arnold (Edited )

    Hi,

    I've just followed the instructions for upgrading on Centos 6 and all appeared to go ok.
    But then some of the tables started showing the following error:

    Native table 'performance_schema'.'session_variables' has the wrong structure

    A quick Google later and it appears I needed to have done

    service mysqld restart

    after the mysql_upgrade. I now don't appear to have the 'wrong structure' errors anymore.

  • Avatar
    Konstantin Annikov

    @Keith, 

    Thank you for the input. I have added this information to article. 

  • Avatar
    Richard Mountain

    I've followed the Centos 6 guide, everything seem to install but it's still running MySql 5.5.57 

    I've tried service mysqld restart

    But this doesn't seem to do anything.

  • Avatar
    Artyom Baranov

    @Richard Mountain,

    Hello! Please provide me with the output of the following commands:

    # plesk version

    # mysql -V

Please sign in to leave a comment.

Have more questions? Submit a request