This guide will discuss the steps required to install MariaDB 11.6 on Fedora. MariaDB is a widely used relational database server that is community-developed, forked from MySQL relational database management system.

MariaDB is an open-source and free software released under the General Public License version 2. The MariaDB packages are distributed as binaries on mariadb.org. But you also have an option to build it from source should you choose to do so.

Step 1: Update Fedora machine

Let’s make sure we’re running the latest versions of Fedora packages in our system.

sudo dnf -y update

Reboot the server after upgrade.

sudo systemctl reboot

Step 2: Add MariaDB RPM repository

Now add the MariaDB RPM repository to your system.

Fedora 41/40

sudo tee /etc/yum.repos.d/mariad.repo<<EOF
[mariadb]
name = MariaDB
baseurl = https://mirror.mariadb.org/yum/11.6/fedora40-amd64/
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
EOF

Fedora 39:

sudo tee /etc/yum.repos.d/mariad.repo<<EOF
[mariadb]
name = MariaDB
baseurl = https://mirror.mariadb.org/yum/11.6/fedora39-amd64/
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
EOF

Fedora 38:

sudo tee /etc/yum.repos.d/mariad.repo<<EOF
[mariadb]
name = MariaDB
baseurl = https://mirror.mariadb.org/yum/11.6/fedora38-amd64/
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1
EOF

Step 3: Install MariaDB 11.6 on Fedora

Now install MariaDB on Fedora Linux system.

sudo dnf install MariaDB-server

Below is the dependency tree and list of packages to be installed.

...
Transaction Summary
===================================================================================================================================================
Install  51 Packages

Total download size: 64 M
Installed size: 237 M
Downloading Packages:

Step 4: Configure MariaDB service on Fedora

After installation of MariaDB on Fedora, start the service and set it to start at system boot.

sudo systemctl enable --now mariadb

Check service status:

$ systemctl status mariadb
● mariadb.service - MariaDB 11.6.2 database server
     Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; preset: disabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
             /etc/systemd/system/mariadb.service.d
             └─migrated-from-my.cnf-settings.conf
     Active: active (running) since Sat 2024-12-14 09:29:54 UTC; 2s ago
 Invocation: 184cd400844e47aab9c2aad9f555ed21
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
    Process: 5659 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= ||   VAR=`/usr/bin/galera_recove>
    Process: 5680 ExecStartPost=/bin/rm -f /var/lib/mysql/wsrep-start-position (code=exited, status=0/SUCCESS)
   Main PID: 5667 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 12 (limit: 62471)
     Memory: 110.3M (peak: 113.7M)
        CPU: 1.032s
     CGroup: /system.slice/mariadb.service
             └─5667 /usr/sbin/mariadbd

Dec 14 09:29:53 fed-cloudspinx-com.novalocal mariadbd[5667]: 2024-12-14  9:29:53 0 [Note] Plugin 'FEEDBACK' is disab>
Dec 14 09:29:53 fed-cloudspinx-com.novalocal mariadbd[5667]: 2024-12-14  9:29:53 0 [Note] Plugin 'wsrep-provider' is>
Dec 14 09:29:53 fed-cloudspinx-com.novalocal mariadbd[5667]: 2024-12-14  9:29:53 0 [Note] InnoDB: Loading buffer poo>
Dec 14 09:29:53 fed-cloudspinx-com.novalocal mariadbd[5667]: 2024-12-14  9:29:53 0 [Note] InnoDB: Buffer pool(s) loa>
Dec 14 09:29:53 fed-cloudspinx-com.novalocal mariadbd[5667]: 2024-12-14  9:29:53 0 [Note] Server socket created on I>
Dec 14 09:29:53 fed-cloudspinx-com.novalocal mariadbd[5667]: 2024-12-14  9:29:53 0 [Note] Server socket created on I>
Dec 14 09:29:53 fed-cloudspinx-com.novalocal mariadbd[5667]: 2024-12-14  9:29:53 0 [Note] mariadbd: Event Scheduler:>
Dec 14 09:29:53 fed-cloudspinx-com.novalocal mariadbd[5667]: 2024-12-14  9:29:53 0 [Note] /usr/sbin/mariadbd: ready >
Dec 14 09:29:53 fed-cloudspinx-com.novalocal mariadbd[5667]: Version: '11.6.2-MariaDB'  socket: '/var/lib/mysql/mysq>
Dec 14 09:29:54 fed-cloudspinx-com.novalocal systemd[1]: Started mariadb.service - MariaDB 11.6.2 database server.

Harden you MariaDB server installation.

$ sudo mariadb-secure-installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

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
haven't set the root password yet, you should just press enter here.

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

Setting the root password or using the unix_socket ensures that nobody
can log into the MariaDB root user without the proper authorisation.

You already have your root account protected, so you can safely answer 'n'.

Switch to unix_socket authentication [Y/n] Y
Enabled successfully!
Reloading privilege tables..
 ... Success!


You already have your root account protected, so you can safely answer 'n'.

Change the 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 '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 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!

Use the root user and password set to access MariaDB shell:

$ mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 19
Server version: 11.6.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.

Version installed can be checked from the DB shell.

MariaDB [(none)]> SELECT VERSION();
+----------------+
| VERSION()      |
+----------------+
| 11.6.2-MariaDB |
+----------------+
1 row in set (0.000 sec)

This confirms successful installation of MariaDB on Fedora Linux system.

Also check related DB guides for Fedora.

LEAVE A REPLY

Please enter your comment!
Please enter your name here