Contact Support : +64 220 256 070

Aimvm
Blog

How to install and configure Mariadb on RHEL7

Posted on: August 18, 2015

This tutorial explains about installing and configuring Mariadb on RHEL&/Centos7.

First add mariadb yum repository.

Open file /etc/yum.repos.d/MariaDB.repo and add the following to it.
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.0/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

 

yum update -y

yum install MariaDB-server MariaDB-client

/usr/bin/mysql_secure_installation or simply mysql_secure_installation

It will ask you for the current root password. Since you just installed MySQL, you need to leave it blank by pressing enter.
Then the prompt will ask you if you want to set a root password. Go ahead and enter Y, and follow the instructions:

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorization.

New password: password
Re-enter new password: password
Password updated successfully!
Reloading privilege tables..
 ... Success!

Now that you have successfully installed Mariadb.

systemctl start mariadb

systemctl enable mariadb

systemctl status mariadb

mysql

 

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is XXXX
Server version: 5.5.X


Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


MariaDB [(none)]> 

Search Blog