How to upgrade MySQL 5.5 to 5.6/5.7 or MariaDB 5.5 to 10.x on Linux?

Follow

Comments

258 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

    0
    Comment actions Permalink
  • 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

    0
    Comment actions Permalink
  • 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

    0
    Comment actions Permalink
  • 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

    0
    Comment actions Permalink
  • 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.

    0
    Comment actions Permalink
  • 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.

    0
    Comment actions Permalink
  • 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

    0
    Comment actions Permalink
  • 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

    0
    Comment actions Permalink
  • 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

    0
    Comment actions Permalink
  • Avatar
    Bulat Tsydenov

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

    0
    Comment actions Permalink
  • 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?

    0
    Comment actions Permalink
  • 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.

    0
    Comment actions Permalink
  • Avatar
    Artur Beqiraj

    @Vitaly Zhidkov 

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

    0
    Comment actions Permalink
  • 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
    0
    Comment actions Permalink
  • 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

    0
    Comment actions Permalink
  • 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.

    0
    Comment actions Permalink
  • 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.

    0
    Comment actions Permalink
  • Avatar
    Konstantin Annikov

    @Keith, 

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

    0
    Comment actions Permalink
  • 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.

    0
    Comment actions Permalink
  • Avatar
    Artyom Baranov

    @Richard Mountain,

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

    # plesk version

    # mysql -V
    0
    Comment actions Permalink
  • Avatar
    Thomas Friedrich

    With Ubuntu 14.04 I had to restart mysql before step 7 worked.

    0
    Comment actions Permalink
  • Avatar
    Robert Asilbekov

    @Thomas Friedrich

    Thank you for the feedback. The article was updated.

    0
    Comment actions Permalink
  • Avatar
    Louis-Philippe Frenette

    For those like me who installed mysql from the webtatic repo here's the workaround to upgrade to 5.6 or 5.7 on Centos 6:

     

    instead of 

    # yum update mysql

    write the following:

    # yum replace mysql55w --replace-with=mysql-community-client mysql55w-libs --replace-with=mysql-community-libs mysql55w-server --replace-with=mysql-community-server

     

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    @Louis-Philippe Frenette

    Thank you for sharing the workaround.
    It may be useful to another Pleskians.

    0
    Comment actions Permalink
  • Avatar
    Stefan

    Thank you for the guide, I sucessfully updated mysql 5.1 to mysql 5.6 on centos 6 with plesk 17.5.3.

    Now, how do I upgrade / replace this mysql 5.6 to maria db 10.1?

    0
    Comment actions Permalink
  • Avatar
    Alexander Hammer

    I have CentOS 7 and Plesk 17.5 and want to upgrade from MaraiaDB 5.5 to 10.1. On my local server (without plesk) I had to run the "mysql_upgrade" command. Do I have to do this on my server with plesk as well?

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello @Alexander! Usually, it is not required. 

    0
    Comment actions Permalink
  • Avatar
    Alexander Hammer

    Dear Ivan, I can answer my own question. When checking the status of the MariaDB service, there where an error message regarding the innodb table(s). After I ran "mysql_upgrade" command the error was gone.

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    @Alexander, thank you for letting us know your experience!

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    @Stefan, use the instruction from this article.

    Please note that it is highly recommended to create a full server backup before applying resolution steps.

    The solution is applied on your own risk.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request