HugeServer Knowledgebase

How to install MariaDB 10 on Centos 6 and 7

Introduction

MariaDB is a backward compatible, drop-in replacement of the MySQL Database Server and it’s led by MySQL developers. MariaDB maintains high compatibility with MySQL, It’s very smooth and lightweight. It includes all major open source storage engines.
In this tutorial, we are going to install the latest version of MariaDB on CentOS 6 & 7.

We are assuming that you have root permission, otherwise, you may start commands with “sudo”.

MariaDB Logo

Install MariaDB on CentOS 6 & 7

If you want to install the latest stable version (10.1) of MariaDB you can not use official repositories, so you have to add MariaDB repository first:

cd /etc/yum.repos.d/

Use your text editor and create a file like below:

nano MariaDB.repo

Now add the following lines to the file then save and exit:

Adding proper repository

For CentOS 6

32-bit operation systems:

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

64-bit operation systems:

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

For CentOS 7

Add the following lines:

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

Installing MariaDB

You can easily install MariaDB via Yum:

yum repolist

yum install mariadb-server mariadb-client

As soon as the installation of MariaDB packages completes, you can enable and start your MariaDB service with the commands below:

Working With MariaDB

CentOS 6

service mariadb start

chkconfig mariadb on

service mariadb status

CentOS 7

systemctl start mariadb

systemctl enable mariadb

systemctl status mariadb

You can check out MariaDB official website for more information and news!

Was this tutorial helpful?

Thank you for your vote.Thank you for your vote.

Similar Posts

One thought on “How to install MariaDB 10 on Centos 6 and 7”

  1. “`
    webmaster@s2:/etc/yum.repos.d$ sudo yum install mariadb-server mariadb-client
    Loaded plugins: fastestmirror
    Setting up Install Process
    Loading mirror speeds from cached hostfile
    * base: mirror.sjc02.svwh.net
    * epel: mirror.sjc02.svwh.net
    * extras: mirror.pac-12.org
    * updates: mirror.sjc02.svwh.net
    No package mariadb-server available.
    * Maybe you meant: MariaDB-server
    No package mariadb-client available.
    * Maybe you meant: MariaDB-client
    Error: Nothing to do
    “`

Leave a Reply

Your email address will not be published. Required fields are marked *

*