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.

reboot

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
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]

name = MariaDB
baseurl = http://yum.mariadb.org/10.4/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

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.

mysql_secure_installation

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.

 

[mariadb]
...
unix_socket=OFF

And the user creation will be like follows,

 

CREATE USER username@hostname IDENTIFIED VIA unix_socket;

© 2020, Techrunnr. All rights reserved.

#1
#2
#3
Questions Answered
Articles Written
Overall Points

Related posts

Leave a Reply