Physical Address

304 North Cardinal St.
Dorchester Center, MA 02124

Install MariaDB 10.1 – CentOS 7.2

About MariaDB

MariaDB one of the most popular and an enhanced drop-in replacements for MySQL. It was created and is maintained by the original developers of MySQL.

MariaDB is very interesting because if is fast, scalable and more robust than MySQL.

Installation

To install MariaDB 10.1 on your CentOS 7.2 box, head over to the repo configurator and get the correct repo for CentOS 7.2:

https://downloads.mariadb.org/mariadb/repositories

Add the resulting config to a new file MariaDB.repo at /etc/yum.repos.d:

# MariaDB 10.1 CentOS repository list - created 2016-06-09 07:27 UTC
# http://downloads.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

Install the server and the client:

yum install MariaDB-server MariaDB-client

To start the server, issue the following:

service mariadb start

To start MariaDB at startup:

chkconfig mariadb on

With a fresh installation there is no password set to the root account, you can simply login to the server by issuing the following at shell:

mysql

To secure the server by setting a password issue the following at shell:

mysql_secure_installation

Follow the steps and it’ll guide you through setting a password for the root user.

That’s it, you’re done!