Database Linux Tutorials

Install MariaDB latest stable ( 10.1.17 ) CentOS 7 / RHEL 7

main_image_mariadb

1) Adding MariaDB Repositories

By default MariaDB 5.x Series was included all the Linux distribution and removed MySQL but they didn’t include MariaDB 10.x series and if you want Add MariaDB Repositories, use the below commands to add MariaDB Repositories on CentOS 7, RHEL 7 systems.

First Create file /etc/yum.repos.d/mariadb.repo then Copy and paste it.

vim /etc/yum.repos.d/mariadb.repo

Screen Shot 2016-10-10 at 7.57.25 PM

[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1.17/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

Screen Shot 2016-10-10 at 7.58.06 PM

2) Install MariaDB

run the following code

yum update

yum install MariaDB-server MariaDB-client

Screen Shot 2016-10-10 at 7.58.24 PM

Screen Shot 2016-10-10 at 7.59.19 PM

Screen Shot 2016-10-10 at 7.59.29 PM

Screen Shot 2016-10-10 at 7.59.46 PM

Screen Shot 2016-10-10 at 8.00.09 PM

3) Start MariaDB Service

Use the below command to start MariaDB server for further usage, and enable it in startup.

systemctl start mariadb
systemctl enable mariadb
systemctl is-enabled mariadb

Screen Shot 2016-10-10 at 8.05.20 PM

4) Secure MariaDB

By default MariaDB wont have root password and it’s security issue. So, run the below command to secure MariaDB installation, This will set root password for MariaDB also set other permission and remove test databases too.

mysql_secure_installation

Screen Shot 2016-10-10 at 8.05.51 PM

and look over the following images.

guess_linux_mariadb9

guess_linux_mariadb2 guess_linux_mariadb3 guess_linux_mariadb4

guess_linux_mariadb5

5) Testing

mysql -u root -p

give your root password.

guess_linux_mariadb6 guess_linux_mariadb7 guess_linux_mariadb8

Thank you.

13 Comments

Leave a Comment