Tips / Nginx

How to install MariaDB on CentOS 6

MariaDB is a fork of the MySQL server, it has been created by the original authors of MySQL and was built to ensure very high compatibility with MySQL server and the API, commands, library and, in other words, it offers a very high level of binary equivalency. Today we will share a tutorial about how to install MariaDB on CentOS 6.

Add the MariaDB Yum Repo

Go to

Choose CentOS 6, then choose your release and version. After that, create the repo file:

nano -w /etc/yum.repos.d/MariaDB.repo

Paste the repo you generated at page:


# MariaDB 10.0 CentOS repository list - created 2014-01-16 11:46 UTC
name = MariaDB
baseurl =

As you see in the above example, it includes a gpgkey line to automatically fetch the GPG key MariaDB uses to sign the repositories. This key is needed to verify the integrity of the packages it downloads.

Installing MariaDB with Yum

sudo yum install MariaDB-server MariaDB-client

If you have the MariaDB-Galera-server package installed, you may need to remove it prior to installing MariaDB-server (with ‘sudo yum remove MariaDB-Galera-server’). If this is your case, ensure to run a backup before you do so.

Finally, start the MariaDB server:

service mysql start

Popular search terms:

  • howto mariadb
  • Remove mariadb centos

Esteban Borges

Linux Geek, Webperf Addict, Nginx Fan. CTO @Infranetworking