Install MariaDB in Linux Server

Posted at December 13, 2016 at 11:31 am by Jithin

In this tutorial, we can learn how to install MariaDB in a Linux Server.

A relational database is a mechanism that allows the persistence of a data in an organize way. Databases store data items, organize as a set of tables with each table representing an entity. There are two types of relational database packages. They are listed below.

1)PostgreSQL: An open source database developed by the PostgreSQL Global Development Group, consisting of Postgres users (both individual and companies) and other companies and volunteers, supervised by companies.

2) MariaDB: A community-developed branch of MySQL built by some of the original authors of MySQL. It offers a rich set off feature enhancement, including alternative storage engines, server optimizations, and patches. The MariaDB Foundation works closely and cooperatively with the larger community of users and developers in the spirit of free and open source software.

MariaDB is one of the most popular database servers in the world. MariaDB is used because it is fast, scalable and robust, with a rich ecosystem of storage engines, and plugins. MariaDB is developed as open source software and as a relational database it provides an SQL interface for accessing data. MariaDB intends to maintain high compatibility with MySQL, ensuring a “drop-in” replacement capability with library binary equivalency and exact matching with MySQL APIs and commands. MariaDB’s API and protocol are compatible with those used by MySQL and also some features support progress reporting and native non-blocking operations. This means that all connectors, libraries, and applications which work with MySQL should also work on MariaDB.

A MariaDB database installation requires both the mariadb and mariadb-client groups of software to be installed.

The following packages will be installed with the mariadb group:

maridb-server: The MariaDB server and related files.

mariadb-bench: MariaDB benchmark scripts and data.

mariadb-test: The test suite distributed with MariaDB.


The following packages will be installed with the mariab-client group:

mariadb: A community-developed branch of MySQL

MySQL-python: A MariaDB interface for Python.

mysql-connector-odbc: ODBC driver for MariaDB.

libdbi-dbd-mysql: MariaDB plug-in for libdbi.

mysql-connector-java: Native Java driver for MariaDB.

perl-DBD-MySQL: A MariaDB interface for Perl.

The /etc/my.cnf file has default configurations for MariaDB, such as the data directory, socket binding, log and error file location. Instead of adding new configurations to the /etc/my.cnf file, a newly created file named *.cnf can be added to the /etc/my.cnf.d/ directory holding configuration of MariaDB


MariaDB Installation

1) Install MariaDB on the server with the yum command.

# yum groupinstall mariadb mariadb-client -y

2) Start the MariaDb service on the server with the systemctl command.

# systemctl start mariadb

The default MariaDB log file is /var/log/mariadb/mariadb.log. This file should be the first place to look when troubleshooting MariaDB.

3) Enable the mariadb service to start at boot on the server.

# systemctl enable mariadb

4) Verify the status of the service on the server.

# systemctl status mariab


Improve MariaDB installation security

MariaDB provides a program to improve security from the baseline install state. Run mysql_secure_installation without arguments:

# mysql_secure_installation

This program enables improvement of MariaDB security in the following ways:

1) Sets a password for root accounts.

2) Remove root accounts that are accessible from outside the local host.

3) Remove anonymous-user accounts.

4) Removes the test database.

The script is fully interactive, and prompt foe each step in the process.


If you need any further assistance please contact our support department.



0.00 avg. rating (0% score) - 0 votes

You can skip to the end and leave a response. Pinging is currently not allowed.

Leave a Reply