How to Install MariaDB 5.5 database on Linux CentOS/RHEL

This tutorial explain about MariaDB installation running on a Linux server. This tutorial will make you understand how to install and setup MariaDB database server in industrial environment.

A brief Introduction about MariaDB Database

MariaDB is a most popular open source database in linux world replacement by MySQL, which is under GNU GPL license. It is much superior to MySQL in terms of features. It offers speed, performance and easy to integrate with various deployments.

Add MariaDB repository on CentOS/RHEL 6 64-bit

We recommend you to create a custom MariaDB YUM repository entry for CentOS/RHEL. Copy and paste it into a file under /etc/yum.repos.d/ (we suggest naming the file MariaDB.repo or something similar). You can build database repository as per your operating system and it’s architecture with MariaDB website .

For CentOS 6 64-bit
# MariaDB 5.5 CentOS repository list – created 2015-12-09 06:38 UTC
# http://mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/5.5/centos6-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

Install MariaDB package

[root@MariaDB ~]# yum install MariaDB-server MariaDB-client

Start MariaDB service
[root@MariaDB ~]# service mysql start
Permanetly on MariaDB service on boot
[root@MariaDB ~]# chkconfig mysql on

Login in database
By default MariaDB installs with blank root password and also with many insecure settings. You can use mysql_secure_installation script to setup db root password, remove anonymous user, disallow remote login and remove test database.

Login in Database without password
[root@MariaDB ~]# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 6
Server version: 5.5.46-MariaDB MariaDB Server
Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
MariaDB [(none)]>

Show available database on server
MariaDB [(none)]> show databases;
+——————–+
| Database |
+——————–+
| information_schema |
| mysql |
| performance_schema |
| test |
+——————–+
4 rows in set (0.00 sec)

Setup MardiDB password and other
[root@MariaDB ~]# mysql_secure_installation
Login in Database
[root@MariaDB ~]# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 11
Server version: 5.5.46-MariaDB MariaDB Server
Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.
MariaDB [(none)]>

Now show available database
MariaDB [(none)]> show databases;
+——————–+
| Database |
+——————–+
| information_schema |
| mysql |
| performance_schema |
+——————–+
3 rows in set (0.00 sec)
MariaDB [(none)]>q\
Share on Google Plus

About Penguin Technology

I am a passionate cloud and DevOps professional specializing in Linux and open-source solutions. Through this blog, I share my knowledge and experience with the community, offering tips and insights on cloud technologies and DevOps practices.
    Blogger Comment

0 comments:

Post a Comment