MariaDB is a relational database which is very similar to MySQL and in fact, built by the team of MySQL but released as a open source database system. In this tutorial, I will show you how you can install MariaDB on a CentOS 7 Machine in a easy way.
I assume that you’ve logged in to your server as a root user in SSH protocol.
This tutorial is created for VPS and Dedicated Server users. If you’re a cloud hosting or web hosting user, you need not install MariaDB as the server itself comes preinstalled with it.
Installing MariaDB 5.3 in CentOS 7
Now run the following command on the CLI to install MariaDB on CentOS 7:
sudo yum install mariadb-server
and the installer might ask you for a confirmation of whether it can proceed with the installation or not. If it does, make sure you type y and hit the enter button to proceed with the installation.
On average, the installation process might take up to 5 minutes based on your server’s compute capacity and network speed.
Once the installation is completed, you can start the MariaDB by running the following command:
systemctl start mariadb
In order to verify that MariaDB is running without any issues, you can execute the following command:
systemctl status mariadb
In the same way you start MariaDB, for any reason if you want to stop the MariaDB service, you can run this command:
systemctl stop mariadb
In default, MariaDB won’t start automatically once the server involves a restart. Which means, after every restart, you have to manually start it by logging in to your server’s SSH. But thankfully, MariaDB supplies an in-built option to have it start automatically after reboots. In order to start MariaDB automatically after every reboot, you have to run the following command:
systemctl enable mariadb
Hope this quick, short, and sweet tutorial was helpful.