How to Upgrade MariaDB 5.5 to MariaDB 10.1 on Centos/rhel 7 and Debian Systems

Source: Internet
Author: User
Tags root access


How to Upgrade MariaDB 5.5 to MariaDB 10.1 on Centos/rhel 7 and Debian Systems


Upgrade MariaDB 5.5 to MariaDB 10.1 on Rhel/centos 7


Reprinted from Https://www.tecmint.com/upgrade-mariadb-5-5-to-10-centos-rhel-debian-ubuntu/What ' s new


Few new features has been added in this version and you can see them below:


    1. galera, a multi-master cluster solution is now standard part of MariaDB.
    2. Added The new information schema tables Added for better examining wsrep information. The tables in question Are wsrep_membership and wsrep_status.
    3. Page compression for InnoDB and XtraDB. Page compression is similar to InnoDB compressed storage format.
    4. Page compression for Fusionio.
    5. Few optimization Tweaks included is:
      1. Don ' t create. frm files for temporary tables
      2. use the M Ax_statement_time to abort long running queries automatically
      3. malloc () function was used less and simple querie S is executed faster
      4. Webscale patches
    6. Plugins update
    7. Security fixes (many VU Lnerabilities has been addressed).


In this tutorial we is going to show what you do to upgrade MariaDB 5.5 to MariaDB 10.1 latest stable version. You'll need to has root access to the machine, where you'll be performing the upgrade.



Note that if you are running earlier version of MariaDB the recommended course of upgrading was by going through each versi On. For example MariaDB 5.1, 5.5, 10.1.


Step 1:backup or Dump all MariaDB Databases


As always when performing a upgrade creating backup of your existing databases is important. You can either dump the databases with command such:


# mysqldump-u Root-ppassword--all-databases >/tmp/all-database.sql


Or Alternatively, you can stop the MariaDB service with:


# systemctl Stop MySQL


and copy the databases directory in a separate folder like this:


# cp-a/var/lib/mysql//var/lib/mysql.bak


In case of failure of the upgrade you can use one of the above copies to restore your databases.


Step 2:add the MariaDB Repository


A good practice is to make sure your packages be up to date before making any changes to your repo files. You can do the with:


# yum update          [On RHEL/CentOS 7]
# apt-get update      [On Debian/Ubuntu]
On Rhel/centos 7


If you had any old packages, wait for the installation to finish. Next, you'll need to the add themariadb 10.1 repo for Centos/rhel 7/distributions. To does this, use your favorite text editor such as Vim or nano and open the following file:


# Vim/etc/yum.repos.d/mariadb10.repo


Add the following text in it:


# MariaDB 10.1 CentOS repository list - created 2016-01-18 09:58 UTC
# http://mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1


Then save and exit the file (for VIM:WQ)


On Debian and Ubuntu


Run The following series of commands to add the MariaDB PPA on your system:


# apt-get install software-properties-common
# apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
# add-apt-repository ‘deb [arch=amd64,i386] http://kartolo.sby.datautama.net.id/mariadb/repo/10.1/ubuntu wily main‘


Important:don ' t forget to replace the Ubuntu wily with your distribution name and release.


Step 3:remove MariaDB 5.5


If you have taken backup of your databases as suggested in Step 1, you is now ready to proceed and remove the existing Ma RIADB installation.



To does this, simply run the following command:


# yum remove mariadb-server mariadb mariadb-libs         [On RHEL/CentOS 7]
# apt-get purge mariadb-server mariadb mariadb-libs      [On Debian/Ubuntu]


Remove MariaDB 5.5 Version



Next, clean the repository cache:


# yum clean all          [On RHEL/CentOS 7]
# apt-get clean all      [On Debian/Ubuntu]
Step 4:installing MariaDB 10.1


Now it's time to install the newer version of MariaDB, by using:


# yum -y install MariaDB-server MariaDB-client      [On RHEL/CentOS 7]
# apt-get install mariadb-server MariaDB-client     [On Debian/Ubuntu]


Install MariaDB Ten on Centos/rhel 7



Once the installation is complete, you can start the MariaDB service with:


# Systemctl Start mariadb


If you want MariaDB to automatically start after system boot, run:


# Systemctl Enable MARIADB


Finally Run the upgrade command to upgrade MariaDB with:


# Mysql_upgrade


MariaDB Upgrade



To verify this upgrade was successful, run the following command:


# mysql-v


Check MariaDB Version



Congratulations, your upgrade has been completed!


Conclusion


Mariadb/mysql upgrades is always the tasks that should is performed with extra caution. I hope yours completed smoothly. If you encounter any issues, please don't hesitate to post a comment.



How to Upgrade MariaDB 5.5 to MariaDB 10.1 on Centos/rhel 7 and Debian Systems


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.