How to Install MariaDB 10.4 centos 7

Do you want to know how to install MariaDB 10.4 centos 7? Abide by the down below measures. This tutorial will support you to get set up it devoid of any err.

Right before dig into the techniques permit us know minimal about MariaDB

What is MariaDB?

MariaDB is a common databases server that is applied as open-supply software program. It has a Standard Community License so it is totally free to entry.

Techniques to Set up MariaDB 10.4 :

Action 1: Update your Technique

Make positive you are managing the current CentOS 7 server. If not Update your method. The command we abide by.

sudo yum  -y update

Action 2: Insert MariaDB 10.4 repository

Develop a new repository on your pc and include the code down below in accordance to your OS and configuration.

sudo file /etc/yum.repos.d/MariaDB.repoF


name = MariaDB

baseurl =




Note: You can update the yum cache index point.

Use the command: sudo yum makecache fast

Step 3: Install MariaDB 10.4 server

Use the following command to install MariaDB 10.4.

sudo yum -y install MariaDB-server MariaDB-client

Note: It installs other dependencies with it automatically.

Step 4: Start and Enable service

sudo systemctl enable --now mariadb

Optional Step: View the installed MariaDB properties

Use the below command to view the MariaDB properties.

$ rpm -qi MariaDB-server

Shows the property as like

Name : MariaDB-server
Version : 10.4.6
Release : 1.el7.centos
Architecture: x86_64
Install Date: Fri 03 Jan 2019 06:31:57 AM ESTf
Group : Applications/Databases
Size : 130648787
License : GPLv2
Signature : DSA/SHA1, Tue 18 Jun 2019 08:13:58 PM CEST, Key ID cbcb082a1bb943db
Source RPM : MariaDB-server-10.4.6-1.el7.centos.src.rpm
Build Date : Tue 24 Dec 2019 03:57:58 AM CEST
Build Host : centos73-amd64
Relocations : (not relocatable)
Vendor : MariaDB Foundation
Summary : MariaDB: a super fast and robust SQL database server
Description :

Step 5: Secure MariaDB Install


In order to log into MariaDB to secure it, we'll need the current password for the root user. If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on…

Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorization.

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
… Success!

By default, a MariaDB installation has an anonymous user, allowing anyone to log into MariaDB without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
… Success!

Normally, root should only be allowed to connect from the 'localhost'. This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
… Success!

By default, MariaDB comes with a database named 'test' that anyone can access. This is also intended only for testing and should be removed before moving into a production environment.

Remove test database and access to it? [Y/n] y

  • Dropping test database…
    … Success!
  • Removing privileges on the test database…
    … Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
… Success!

Cleaning up…

All done! If you've completed all of the above steps, your MariaDB installation should now be secure.

Thanks for using MariaDB!

You did it man. Installation is done now. Do you want to connect to the MariaDB server? Follow the below command.

$ mysql -u root -p

Final Words:

Now you can play around the Database by creating Tables, User, etc.

If you have anything to ask, leave your query below