how to install MariaDB 10.4 in Centos 72 min read

Prabhin Prabharkaran Administrator
DevOps Engineer

He is a Technical professional. He is a person who loves to share tricks and tips on the Internet. He Posts what he does!

follow me

Hi All, this document shows you how to install MariaDB 10.4 in Centos 7.
MariaDB is a community-developed, commercially supported fork of the MySQL relational database management system, intended to remain free and open-source software under the GNU General Public License.

Let’s go to the installation Part.

Step 0: Update the system

yum update -y

This will help you to keep update the system to the latest version. Once you update the system reboot the server as some packages need a reboot to updates to take effect.


Step 1: Add the MariaDB 10.4 repository to the system

Create a file

vi /etc/yum.repos.d/MariaDB.repo

Add the below contents in the repo file.

# MariaDB 10.4 CentOS repository list

name = MariaDB
baseurl =

Step 2: Now install the MariaDB 10.4 server using yum.


yum install MariaDB-client MariaDB-server

Step 3: Once you complete step 2, secure your MariaDB server by executing the below command.


In this version of MariaDB support UNIX socket authentication to access the database. It is one of the major difference which I have seen from the past version installations.
Apart from the Repo URL, there is no difference in the installation from the past versions.
The unix_socket authentication plugin allows the user to use operating system credentials when connecting to MariaDB via the local Unix socket file. This Unix socket file is defined by the socket system variable.

Unix socket authentication can be enabled or disabled during mysql_secure_installation or can do this using the configuration in my.cnf file.



And the user creation will be like follows,


CREATE USER username@hostname IDENTIFIED VIA unix_socket;

© 2020, Techrunnr. All rights reserved.

Questions Answered
Articles Written
Overall Points

Related posts

Leave a Reply