Knowledge Base

How Can We Help?

Install MariaDB in Linux Server

You are here:

This guide will demonstrate the steps to install MariaDB on a Linux Server.

A relational database is a tool that allows for the storage of data in an organized manner. Databases store data items and organize them into tables, with each table representing an entity. There are two main types of relational database packages available, both of which are featured below.

1) PostgreSQL: An open-source database developed by the PostgreSQL Global Development Group, consisting of a community of both individual and corporate users as well as volunteers, overseen by various companies.

2) MariaDB: A community-developed version of MySQL, created by some of the original authors of MySQL. It offers a wide range of feature enhancements, including alternative storage engines, server optimizations, and patches. The MariaDB Foundation collaborates closely with a large community of users and developers in the spirit of free and open-source software.

MariaDB is regarded as one of the most popular database servers worldwide. With its speed, scalability, and robustness, along with a rich ecosystem of storage engines and plugins, MariaDB has gained considerable popularity. As open-source software, it provides an SQL interface for accessing data. MariaDB aims to maintain high compatibility with MySQL, ensuring a seamless transition with binary equivalence, exact matching of MySQL APIs and commands, enabling it to be a “drop-in” replacement. MariaDB’s API and protocol are in line with those used by MySQL, and it also offers features such as progress reporting and native non-blocking operations. This means that all connectors, libraries, and applications that work with MySQL should also work with MariaDB.

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

The mariadb group installation includes the following packages:

mariadb-server: The MariaDB server and its related files.

mariadb-bench: MariaDB benchmark scripts and data.

mariadb-test: The test suite that comes with MariaDB.

The mariadb-client group installation includes the following packages:

mariadb: A community-developed version of MySQL.

MySQL-python: A MariaDB interface for Python.

mysql-connector-odbc: An ODBC driver for MariaDB.

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

mysql-connector-java: A native Java driver for MariaDB.

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

The /etc/my.cnf file contains default configurations for MariaDB, such as the data directory, socket binding, and the location of log and error files. Instead of adding new configurations to the /etc/my.cnf file, you can create a new file with a .cnf extension inside the /etc/my.cnf.d/ directory to hold MariaDB configuration.

MariaDB Installation Steps

1) Use the yum command to install MariaDB on the server.

# yum groupinstall mariadb mariadb-client -y

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

# systemctl start mariadb

The default location for the MariaDB log file is /var/log/mariadb/mariadb.log. This is the first place you should look when troubleshooting any issues with MariaDB.

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

# systemctl enable mariadb

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

# systemctl status mariadb

Enhancing MariaDB Installation Security

MariaDB offers a program that improves security from the initial installation state. Run the mysql_secure_installation program without any arguments:

# mysql_secure_installation

This program enhances MariaDB security in the following ways:

1) Sets a password for root accounts.

2) Removes root accounts that can be accessed from outside the local host.

3) Deletes anonymous user accounts.

4) Removes the test database.

The script is fully interactive and prompts for each step of the process.

If you require additional assistance, please contact our support department.

Installing MariaDB on a Linux Server

Leave a Comment