skip to Main Content

In this tutorial, I’ll show you how to install MariaDB 10.3.10 on CentOS 7.5 (1804).

This tutorial assumes that you are running a stock/default installation of CentOS 7.5, and have NOT previously installed MariaDB. If you have already installed MariaDB, please see our tutorial on How to Upgrade MariaDB 5.5 to MariaDB 10.3 on CentOS 7.5 (1804)

 

1. Make sure you’re NOT already running MySQL/MariaDB

Run the following command:

mysql -v

Should output the following:

-bash: mysql: command not found

Perfect, let’s keep going!

 

2. Add the MariaDB 10.3 Repository

Run the following command to add the MariaDB 10.3 repository to yum:

nano /etc/yum.repos.d/maria10-3.repo

Paste the following into the editor

# MariaDB 10.3 CentOS repository list - created 2018-11-19 23:14 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.3/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

Save and close the editor, then move to the next step

 

3. Install MariaDB 10.3 and verify success

Run the following command to install MariaDB 10.3:

yum install MariaDB-server MariaDB-client

Once yum does it’s thing, start the MariaDB daemon:

systemctl start mariadb

Then verify that the service has started and the installation is complete:

mysql -v

You should see output similar to the following:

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 8
Server version: 10.3.10-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Awesome, type “quit” to exit, and let’s wrap this up by securing the installation!

 

4. Securing the Installation

Run the following command

mysql_secure_installation

Now answer the questions that you will be prompted for (the answers I’ve provided are generally what you want to do as well:

Enter current password for root (enter for none):
Set root password? [Y/n] y
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y

Aaaaaand that’s it! You should now be up and running with a secured installation of MariaDB 10.3.

Sponsored Links

This Post Has 0 Comments

Don't be shy, leave a reply!