ScaleScaleScaleScale

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 https://downloads.mariadb.org/mariadb/repositories/#mirror=somerset

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 mariadb.org page:

Example:

# MariaDB 10.0 CentOS repository list - created 2014-01-16 11:46 UTC
# http://mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.0/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

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
profile

Esteban Borges

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