Step 1 – Add MariaDB Yum Repository

First add MariaDB yum repository in our system. Create a new repo file /etc/yum.repos.d/mariadb.repo in your system and add below code as per your operating system and architecture.

Step 2 – Install MariaDB on CentOS 8

Let’s use the following command to install MariaDB 10.4 in your system. This will also install other dependencies automatically. After installing MariaDB in your system start it’s service using the following command.

Step 3 – Secure MariaDB Install

You also need to secure your MariaDB installation using passwords and do some other changes. To do this run secure installation script from command line. The secure installation script will ask for user input as some points, follow the installation as per below output showing, All user inputs are highlighted with red color.

Step 4 – Working with MariaDB

After installing and completing the configuration, connect to a MariaDB server using the following command. Also try to create a new database, user and assign privileges to a database.

You may also required install phpMyAdmin to manage MariaDB using web interface, which provides easy way to work.