How to install MariaDb 10.1 on CentOS 7.1

MariaDb is a fork of MySQL Server. This tutorial is going to show you how to install the latest version of MariaDb 10.1 on CentOS 7.1. I will try to explain step by step to get MariaDb 10.0 up and running on CentOS 7.1.

First, login to CentOS. I am using Putty to connect to my remote CentOS Server which is located in the Cloud (DigitalOcean Cloud). Next, at the Shell or command line, go to /etc/yum.repos.d

cd /etc/yum.repos.d

Create a new repo file called MariaDb.repo

nano MariaDb.repo

Now paste the following lines to it

# MariaDB 10.1 CentOS repository list – created 2016-01-27 14:57 UTC
# http://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

For other versions, you can check the official page of MariaDb repositories.

Now install MariaDb using this command

yum install MariaDB-server MariaDB-client

install mariadb 10 on centos 7

By default, MariaDb server comes without any root password. You can login to MariaDb using this command

mysql -u root -p

Please note that the default root password is none, simply press enter when it asked for root password. You can then secure the MariaDb installation with this command

mysql_secure_installation

Done.

Admin

Leave a Reply

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