Easy Steps To Install MariaDB 10.11 on Rocky Linux 9

This guide intends to teach you to Install MariaDB 10.11 on Rocky Linux 9. The current LTS version MariaDB 10.11 has been maintained for five years. As you know, MariaDB is a database management system that is fast and scalable. Also, it has more storage engines than MySQL. Stay with the rest of the article on the Orcacore website to Install MariaDB 10.11 on Rocky Linux 9.

How To Install MariaDB 10.11 on Rocky Linux 9?

To set up MariaDB 10.11 repository, you must have access to your server as a non-root user with sudo privileges. To do this, you can follow our guide the Initial Server Setup with Rocky Linux 9.

Now follow the steps below to create a MariaDB 10.11 Repository and install it on Rocky Linux 9.

Step 1 – Add MariaDB 10.11 Repository on Rocky Linux 9

At this point, you need to create a MariaDB 10.11 Repository. To do this, you can use your desired text editor, here we use the vi editor:

sudo vi /etc/yum.repos.d/mariadb.repo

Add the following content to the file for MariaDB 10.11 Repository:

[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.11/rhel9-amd64
module_hotfixes=1
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1 

When you are done, save and close the file.

Then, use the following command to run the system update:

sudo dnf update -y

Step 2 – MariaDB Installation on Rocky Linux 9

At this point, you can use the following command to install your MariaDB 10.11:

sudo dnf install MariaDB-server -y

Step 3 – Start and Enable MariaDB Service

When your installation is completed, start and enable your service by using the command below:

sudo systemctl enable --now mariadb

Then, check your MariaDB service is active and running on Rocky Linux 9 with the following command:

sudo systemctl status mariadb
Output
● mariadb.service - MariaDB 10.11.2 database server
     Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor >
    Drop-In: /etc/systemd/system/mariadb.service.d
             └─migrated-from-my.cnf-settings.conf
     Active: active (running) since Wed 2023-05-10 05:03:13 EDT; 5s ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
    Process: 66484 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_>
    Process: 66485 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] &>
    Process: 66505 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP>
   Main PID: 66493 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 12 (limit: 23609)
     Memory: 162.5M
        CPU: 489ms
     CGroup: /system.slice/mariadb.service
             └─66493 /usr/sbin/mariadbd
...

Step 4 – Secure MariaDB Installation

At this point, you can secure your MariaDB 10.11 installation on Rocky Linux 9 by running a security script. To do this, use the following command:

sudo mariadb-secure-installation

You will be asked to set a root password for your MariaDB and from there enter yes to answer other questions.

mariadb security script rocky linux

Step 5 – Access MariaDB Shell

Now you can access your MariaDB shell on Rocky Linux 9 with the command below:

sudo mysql -u root -p

Enter your root password and press enter.

Output
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 11
Server version: 10.11.2-MariaDB MariaDB Server

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

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>

For more information, you can visit the MariaDB Documentation Page.

Here are some MariaDB guides that you may be interested in using:

How To Upgrade MariaDB on AlmaLinux 9

Reset MySQL And MariaDB Root Password on Ubuntu 22.04

How To Upgrade MariaDB on Centos 7

Conclusion

At this point, you have learned to Install The current LTS version MariaDB 10.11 which has been maintained for five years on Rocky Linux 9. It is a powerful and easy-to-use database management for creating and managing your databases. Hope you enjoy it.

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!