Install latest version of MariaDB on CentOS 7

Jump to: navigation, search

CentOS 7 by default provide MariaDB 5.5. To install latest version of MariaDB, go to

On this page, you can select MariaDB version you need. It will provide you yum repository configuration and command to install MariaDB.

In this case, i install MariaDB version 10.1

Create file

vi /etc/yum.repos.d/MariaDB.repo

Add following content

# MariaDB 10.1 CentOS repository list - created 2017-01-24 08:01 UTC
name = MariaDB
baseurl =

Now if you have previous MySQL versions installed, it is better remove it. For me, i had MariaDB 5.5 installed, so i removed it with.

yum remove mariadb mariadb-server mariadb-libs

Also, it is better remove any left over config files (Take backup before you remove, better just rename).

Some of the locations are

ls -l /etc | grep -i mysql
ls -l /var/lib | grep -i mysql

Once you have cleaned your system, install latest MariaDB with command.

yum install MariaDB-server MariaDB-client