How to Upgrade MariaDB 5.5 to MariaDB 10.0 using YUM

Channel: Linux
Abstract: //yum.mariadb.org/RPM-GPG-KEY-MariaDBLets use following command to install MariaDB 10.0. # yum install MariaDB-server MariaDB-client

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.

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)]>

Ref From: tecadmin

Related articles