About MariaDB

MariaDB is a fork of the MYSQL storage engine created early in 2009 before the database software was purchased in early 2010 by Oracle. The software is named after the daughter of lead developer Michael "Monty" Widenius, who is also one of the founders of MySQL AB. MariaDB's software development lifecycle got up to 10.1 in 2015 and 10.2 in 2017. MariaDB version 10.2 employs innoDB as a default storage engine and JSON as a new data type. MariaDB was released under the GNU Public License (GPL) and is open source. Its good features, along with performance and reliability have made the database software successful, with thousands of downloads daily and millions of installations world wide.

The database features

The open source database is able to handle tables in the tens of thousands and data in billions of rows. It is great for small projects which require a db that can also handle small queries. Being able to do all these smoothly with concurrent speed makes it ideal for small and medium sized businesses. Also the database has a concern for security, such that when security issues are reported, a new software release with a patch for that security flaw is made available. In conjunction with the Mitre Organization, the MariaDB team works to ensure all security issues are sufficiently documented and published with new releases.

Step1 : Preparing for installation

You will need a CentOS 7 server with the yum program installed. To ensure the server is up to date execute the following Linux command:

 $ sudo yum update 

To install the package from the MariaDB servers, type the following command and press "y" when the installation reaches a dialog prompt.

 $ sudo yum install mariadb-server 

Once complete you can start mariaDB by typing the following command

 $ sudo systemctl start mariadb 

To confirm the daemon has started since the systemctl command doesn't yield an output we use the following command.

 $ sudo systemctl status mariadb 

The output should contain the words "active" and running with the last line containing the words: "Started MariaDB database server"

Next to make sure mariaDB starts at boot time we use the enable command.

 $ sudo systemctl enable mariadb 
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service. 

Step 2 : Making MariaDB secure

This entails changing default values for functionalities such as sample users and remote login. To run the script which contains these default values type.

 $ sudo mysql_secure_installation 

The first prompt from the script is a request for the server's root password. We respond by pressing the "ENTER" key. The password prompt will follow then we set the root password.

Following we accept all the suggestions given by the security script by typing "Y" and then ENTER to accept the rememaining prompts which will delete anonymous users, disable remote root login, delete the test database and reload all privileges.

Step 3 : Testing the MariaDB installation

We can test our installation by connecting with the administrative tool "mysqladmin". Use the following commands to connect to MariaDB as root.

 $ mysqladmin -u root -p version 
The output would look something like this:

mysqladmin  Ver 9.0 Distrib 5.5.50-MariaDB, for Linux on x86_64
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Server version          5.5.50-MariaDB
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /var/lib/mysql/mysql.sock
Uptime:                 7 min 9 sec

Threads: 3  Questions: 12  Slow queries: 0  Opens: 3  Flush tables: 4  Open tables: 29  Q


With this the installation has been completed successfully.


We have installed and secured MariaDB on CentOS 7 in this tutorial you may also be interested in installing PHP and MySQL

Phanerus Banner