• Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us
TecAdmin
Menu
  • Home
  • Ubuntu 18.04
    • Whats New?
    • Upgrade Ubuntu
    • Install Java
    • Install Node.js
    • Install Docker
    • Install Git
    • Install LAMP Stack
  • Tutorials
    • AWS
    • Shell Scripting
    • Docker
    • Git
    • MongoDB
  • Funny Tools
  • FeedBack
  • Submit Article
  • About Us

How to Upgrade MariaDB 5.5 to MariaDB 10.0 using YUM

Written by Rahul, Updated on May 7, 2014

MariaDB 10.0 Stable version has been released and available to install using yum package manager. Today we have upgrading TecAdmin.net database server from MariaDB 5.5 to MariaDB 10.0 using Yum. This upgrade goes very smooth for me. But be carefully and keep backup for you all database to recovery from unnecessary damage.

MariaDB Upgrade 5.5 to 10.0

Step 1: Backup Databases

We recommend to backup all your databases before upgrading mariadb. You can use any tool as per your preference to do it. For this example i am taking a full backup of all databases using mysqldump.

# mysqldump -u root -p --all-databases > alldb.sql

Step 2: Add MariaDB Yum Repository

For this tutorial we assumes you are running the CentOS-6 system, Create yum repository configuration file /etc/yum.repos.d/mariadb.repo and add the below configuration.

For CentOS-6 64 Bit:

[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.0/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

For CentOS-6 32 Bit:

[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.0/centos6-x86
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

For Other versions, you can use mariadb repository generator tool.

Step 3: Upgrade MariaDB

To avoid any conflict firstly i would recommend to remove any existing MariaDB/MySQL installation done.

# yum remove mysql MySQL-server MySQL-shared MySQL-shared-compat MariaDB-server MariaDB-client

The above command should remove all packages depending on MariaDB/MySQL, Lets use following command to install MariaDB 10.0.

# yum install MariaDB-server MariaDB-client

It may be php-mysql package has removed during uninstallation of MariaDB 5.5. So install it also.

# yum install php-mysql

Finally start MariaDB, update data files, Also restart Apache service

# service mysql start
# mysql_upgrade
# service httpd restart

Step 4: Verify MariaDB Upgrade

After upgrading there is nothing to do. If everything goes fine, all your databases should be there. Let’s connect to MariaDB service using old password.

# mysql -p

Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or g.
Your MariaDB connection id is 4
Server version: 10.0.10-MariaDB-log MariaDB Server

Copyright (c) 2000, 2014, Oracle, SkySQL Ab and others.

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

MariaDB [(none)]>

Share it!
Share on Facebook
Share on Twitter
Share on LinkedIn
Share on Reddit
Share on Tumblr
Share on Whatsapp
Rahul
Rahul
Connect on Facebook Connect on Twitter

I, Rahul Kumar am the founder and chief editor of TecAdmin.net. I am a Red Hat Certified Engineer (RHCE) and working as an IT professional since 2009..

7 Comments

  1. Avatar Ashok Reply
    April 12, 2017 at 7:57 am

    Hi Rahul, I am glad about your useful posts.. Can you please tell me what package should I be adding to /etc/yum.repos.d/ for the below command to work –

    yum install openstack-heat-api openstack-heat-api-cfn openstack-heat-engine

    Currently, it throws the below three lines of error –
    No package openstack-heat-api available.
    No package openstack-heat-api-cfn available.
    No package openstack-heat-engine available.

    I am a newbie in linux especially with admin stuff. Any info will be of great help.

  2. Avatar David Baxter Reply
    February 12, 2017 at 7:48 pm

    I followed the instructions you gave me (omitting the redundant -p flag in two places) and was successful in upgrading to 10.0.29-MariaDB.

    The only casualty was that php.ini was removed as part of removing dependencies.

    I recompiled apache-php and this restored php.ini.

  3. Avatar David Baxter Reply
    February 11, 2017 at 6:45 pm

    If you are already logged into the root with SSH, use this to backup the databases instead:

    mysqldump -u root –all-databases > alldb.sql

    i.e., omit the extra -p flag which is asking for an additional password and may give you an error.

  4. Avatar Satalink Reply
    December 20, 2015 at 2:50 pm

    ^^ before yum upgrade do:
    shell> yum clean all

  5. Avatar Satalink Reply
    December 20, 2015 at 2:47 pm

    All I did was: (MariaDB 5.5 to MariaDB 10.1)

    # Create or Update /etc/yum.repo.d/MariaDB.repo
    [mariadb]
    name = MariaDB
    enabled=1
    baseurl = http://yum.mariadb.org/10.1/centos7-amd64
    gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
    gpgcheck=1

    #Backup all databases to /root/tmp/
    1. cd /root/tmp
    2 . shell > mysqldump –all-databases > all_databases.sql

    # If you have exclusions in /etc/yum.conf, you should comment them out

    #yum upgrade
    1. shell > yum upgrade

  6. Avatar ZenDawgg Reply
    February 25, 2015 at 5:20 pm

    Hello – I tried your tutorial but I’m getting errors. Thanks.

    [[email protected] /]# yum install MariaDB-server MariaDB-client
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
    * base: mirror.symnds.com
    * epel: fedora.mirrors.pair.com
    * extras: mirror.net.cen.ct.gov
    * updates: http://ftp.osuosl.org
    Resolving Dependencies
    –> Running transaction check
    —> Package MariaDB-client.x86_64 0:10.0.16-1.el6 will be installed
    –> Processing Dependency: MariaDB-common for package: MariaDB-client-10.0.16-1.el6.x86_64
    —> Package MariaDB-server.x86_64 0:10.0.16-1.el6 will be installed
    –> Running transaction check
    —> Package MariaDB-common.x86_64 0:10.0.16-1.el6 will be installed
    –> Processing Dependency: MariaDB-compat for package: MariaDB-common-10.0.16-1.el6.x86_64
    –> Running transaction check
    —> Package MariaDB-compat.x86_64 0:10.0.16-1.el6 will be installed
    –> Finished Dependency Resolution

    Dependencies Resolved

    =========================================================================================
    Package Arch Version Repository Size
    =========================================================================================
    Installing:
    MariaDB-client x86_64 10.0.16-1.el6 mariadb 11 M
    MariaDB-server x86_64 10.0.16-1.el6 mariadb 57 M
    Installing for dependencies:
    MariaDB-common x86_64 10.0.16-1.el6 mariadb 23 k
    MariaDB-compat x86_64 10.0.16-1.el6 mariadb 2.7 M

    Transaction Summary
    =========================================================================================
    Install 2 Packages (+2 Dependent packages)

    Total size: 71 M
    Installed size: 292 M
    Is this ok [y/d/N]: y
    Downloading packages:
    Running transaction check
    Running transaction test

    Transaction check error:
    file /etc/my.cnf from install of MariaDB-common-10.0.16-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64
    file /usr/share/mysql/czech/errmsg.sys from install of MariaDB-server-10.0.16-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64
    file /usr/share/mysql/danish/errmsg.sys from install of MariaDB-server-10.0.16-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64
    file /usr/share/mysql/dutch/errmsg.sys from install of MariaDB-server-10.0.16-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64
    file /usr/share/mysql/english/errmsg.sys from install of MariaDB-server-10.0.16-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64
    file /usr/share/mysql/estonian/errmsg.sys from install of MariaDB-server-10.0.16-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64
    file /usr/share/mysql/french/errmsg.sys from install of MariaDB-server-10.0.16-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64
    file /usr/share/mysql/german/errmsg.sys from install of MariaDB-server-10.0.16-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64
    file /usr/share/mysql/greek/errmsg.sys from install of MariaDB-server-10.0.16-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64
    file /usr/share/mysql/hungarian/errmsg.sys from install of MariaDB-server-10.0.16-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64
    file /usr/share/mysql/italian/errmsg.sys from install of MariaDB-server-10.0.16-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64
    file /usr/share/mysql/japanese/errmsg.sys from install of MariaDB-server-10.0.16-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64
    file /usr/share/mysql/korean/errmsg.sys from install of MariaDB-server-10.0.16-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64
    file /usr/share/mysql/norwegian-ny/errmsg.sys from install of MariaDB-server-10.0.16-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64
    file /usr/share/mysql/norwegian/errmsg.sys from install of MariaDB-server-10.0.16-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64
    file /usr/share/mysql/polish/errmsg.sys from install of MariaDB-server-10.0.16-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64
    file /usr/share/mysql/portuguese/errmsg.sys from install of MariaDB-server-10.0.16-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64
    file /usr/share/mysql/romanian/errmsg.sys from install of MariaDB-server-10.0.16-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64
    file /usr/share/mysql/russian/errmsg.sys from install of MariaDB-server-10.0.16-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64
    file /usr/share/mysql/serbian/errmsg.sys from install of MariaDB-server-10.0.16-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64
    file /usr/share/mysql/slovak/errmsg.sys from install of MariaDB-server-10.0.16-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64
    file /usr/share/mysql/spanish/errmsg.sys from install of MariaDB-server-10.0.16-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64
    file /usr/share/mysql/swedish/errmsg.sys from install of MariaDB-server-10.0.16-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64
    file /usr/share/mysql/ukrainian/errmsg.sys from install of MariaDB-server-10.0.16-1.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.41-2.el7_0.x86_64

    Error Summary

    • Rahul Rahul Reply
      March 1, 2015 at 3:58 am

      It looks you don’t have uninstalled all MariaDB 5 packages first. Please older packages and install newer version.

Leave a Reply Cancel reply

Popular Posts

  • How to Install Python 3.9 on CentOS/RHEL 7 & Fedora 32/31 0
  • How To Install VNC Server on Ubuntu 20.04 1
  • How To Install NVM on macOS with Homebrew 0
  • (Solved) apt-add-repository command not found – Ubuntu & Debian 0
  • How to Install .NET Core on Debian 10 0
© 2013-2020 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy