MariaDB is an open source community developed database management system. MariaDB was designed as a replacement for MySQL and strives to maintain compatibility with MySQL. In fact in most instances MariaDB will work identically to and some would even argue better than MySQL. The focus of this article is to help you install MariaDB, however If you’d like to install MySQL instead you won’t have to go far. Here is our guide on: How to install MySQL (CentOS 7). Let’s take a look at installing MariaDB below.
How To Install MariaDB In CentOS 7
Before we get started you’ll need to login to your server via SSH. If you’re not certain how to do this, don’t worry we’ve got you covered as we have written a guide that will show you the ins and outs of Connecting to Your Server via SSH. Once connected you may move on to the rest of this article. MariaDB is now the preferred database management system for CentOS 7 and as such is very simple to install:
yum install mariadb-server
Once you confirm the installation, that one line should take care of everything that is required to install MariaDB in CentOS 7. Once installed you’ll need to start MariaDB and ensure that it always starts at boot by issuing these commands:
systemctl start mariadb systemctl enable mariadb
To ensure that MariaDB started successfully it is advised to use the following command to check its status:
systemctl status mariadb
Last but not least you’ll need to execute the security script for MariaDB, which allows you to change the default MariaDB root user password.
Follow the on screen instructions to change the password and finalize your MariaDB installation. If everything completed without any errors, MariaDB should now be fully functional on your server!