

Table of Contents
1. Login via SSH and update the system
To install MariaDB on your CentOS 7 server you need to have a full root access to the server. Full root SSH access is included with all our Linux VPS hosting plans. Before you continue with the instructions below, connect to your server via SSH and make sure your system software is up to date.
yum update
2. Install MariaDB on CentOS 7
It became very easy to install MariaDB on the latest CentOS release. To install MariaDB on your CentOS 7 VPS, run the following command:
yum install mariadb-server
The installer will ask you to confirm the MariaDB installation. Just type y and press Enter.
The installation will take a few seconds depending on the connection speed and server performance.
3. Manage MariaDB on CentOS 7
Once the installation is completed it is good to know how you can manage the MariaDB service. To start the MariaDB service, run the following command on the terminal:
systemctl start mariadb
To stop the MariaDB service, you can use the following command:
systemctl stop mariadb
To restart the service, you can run the following command:
systemctl restart mariadb
To check the status of the MariaDB service, run the following command:
systemctl status mariadb
4. Enable MariaDB on system boot
To enable the MariaDB service on system boot, run the following command:
systemctl enable mariadb
In case you want MariaDB disabled on system boot, run the following command:
systemctl disable mariadb
5. Secure MariaDB on CentOS 7
Once you install the MariaDB database server on your CentOs 7 VPS, it is recommended to harden the security of the service. A good starting point is to run the security hardening script, shipped with the MariaDB service. To run the script, you can use the following command:
mysql_secure_installation

To connect to the MariaDB server as root through the command line, you can use the following command:
mysql -u root -p
Then, type the MariaDB root password which you have set during the initial MariaDB service security hardening.

PS. If you liked this post on how to install MariaDB on CentOS 7, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.
Awesome Article…!!!! Thanks for sharing such a wonderful information with us. This blog is so important because in which you explain Mariadb very well and it is so helpful for all student including me who want to learn mariadb.