Logo
  • Ubuntu
  • CentOS
  • Debian
  • Fedora
  • RedHat

How to Install MariaDB Server on Rocky Linux 8 - DesignLinux

Jul 30 2021
designlinux 0 Comments

MariaDB is a free and community-developed relational database system that is a compatible drop-in replacement for the hugely popular MySQL database management system.

It was forked from MySQL after the original developers of MySQL expressed their misgivings with the acquisition of MySQL by Oracle. Since then, MariaDB is guaranteed to remain free and open source under the GNU license.

MariaDB is massively popular for its fast performance, scalability, stability, and robustness. It is compatible with a wide range of operating systems including Linux, FreeBSD, Mac, and Windows.

The rich set of storage engines, plugins, and other cool tools that it provides make it an ideal option for various use cases such as data analytics, data warehousing, transactional processing, and so on. In fact, it’s a key component of the LAMP & LEMP stacks which are used for hosting web applications.

MariaDB Features

Key Features of MariaDB include:

  • Galera clustering technology.
  • New Storage engines such as InnoDB, XtraDB, Aria, TokuDB, CONNECT, and SEQUENCE to mention a few.
  • Faster and improved replication.
  • Advanced thread pool capable of supporting up to 200,00+ connections.
  • New features such as system-versioned tables, anchored data types, and UNIX socket authentication to mention a few.

In this article, we walk you through how to install the MariaDB database server on Rocky Linux 8.

Step 1: Add MariaDB Repository in Rocky Linux

By default, the Rocky Linux AppStream repository provides MariaDB 10.3. However, this is not the latest version. At the moment, the current stable release is MariaDB 10.6.

To install the latest version, create a MariaDB repository file on your system as follows.

$ sudo vim /etc/yum.repos.d/mariadb.repo

Paste the lines shown.

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

Then save the changes and exit from the file.

Next, update the system repositories for Rocky to register the newly added repository.

$ sudo dnf update

Step 2: Install MariaDB in Rocky Linux

With the repository in place, move along and install the MariaDB database server as shown:

$ sudo dnf install mariadb-server mariadb

Once installed, enable MariaDB service to start on boot time and start the service using the following commands.

$ sudo systemctl enable mariadb
$ sudo systemctl start mariadb

Then verify the running status of MariaDB.

$ sudo systemctl status mariadb

The output shows that everything is working as it should.

Check MariaDB Status
Check MariaDB Status

Step 3: Secure MariaDB in Rocky Linux

MariaDB comes with default settings that are weak and present security risks that can cause the database server to be exploited by hackers. Therefore, we need to take additional measures to secure the database server.

To do so, we will run the script below.

$ sudo mysql_secure_installation

First, set the root password.

Set MariaDB Root Password
Set MariaDB Root Password

For the remaining prompts, press ‘Y’ to purge anonymous users, disallow remote root login and remove the test database which is not required in production and finally save the changes.

Secure MariaDB Installation
Secure MariaDB Installation

To log in to the MariaDB database server, run the following command

$ sudo mysql -u root -p

Provide the root password that you configured in the previous step and press ENTER to access the MariaDB shell.

Login to MariaDB Shell
Login to MariaDB Shell

And there you go. We have successfully installed the MariaDB database server on Rocky Linux 8. Remember, you can still use the version provided by the AppStream repository which will work just fine. However, if you are looking to install the latest version of MariaDB, then adding the repository will do the trick.

Related

Tags: MariaDB Tips, Rocky Linux Tips

How to Install LAMP Stack on Rocky Linux 8

Prev Post

How to Install Java 16 in Rocky Linux and AlmaLinux

Next Post
Archives
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • July 2022
  • June 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
Categories
  • AlmaLinux
  • Android
  • Ansible
  • Apache
  • Arch Linux
  • AWS
  • Backups
  • Bash Shell
  • Bodhi Linux
  • CentOS
  • CentOS Stream
  • Chef
  • Cloud Software
  • CMS
  • Commandline Tools
  • Control Panels
  • CouchDB
  • Data Recovery Tools
  • Databases
  • Debian
  • Deepin Linux
  • Desktops
  • Development Tools
  • Docker
  • Download Managers
  • Drupal
  • Editors
  • Elementary OS
  • Encryption Tools
  • Fedora
  • Firewalls
  • FreeBSD
  • FTP
  • GIMP
  • Git
  • Hadoop
  • HAProxy
  • Java
  • Jenkins
  • Joomla
  • Kali Linux
  • KDE
  • Kubernetes
  • KVM
  • Laravel
  • Let's Encrypt
  • LFCA
  • Linux Certifications
  • Linux Commands
  • Linux Desktop
  • Linux Distros
  • Linux IDE
  • Linux Mint
  • Linux Talks
  • Lubuntu
  • LXC
  • Mail Server
  • Manjaro
  • MariaDB
  • MongoDB
  • Monitoring Tools
  • MySQL
  • Network
  • Networking Commands
  • NFS
  • Nginx
  • Nodejs
  • NTP
  • Open Source
  • OpenSUSE
  • Oracle Linux
  • Package Managers
  • Pentoo
  • PHP
  • Podman
  • Postfix Mail Server
  • PostgreSQL
  • Python
  • Questions
  • RedHat
  • Redis Server
  • Rocky Linux
  • Security
  • Shell Scripting
  • SQLite
  • SSH
  • Storage
  • Suse
  • Terminals
  • Text Editors
  • Top Tools
  • Torrent Clients
  • Tutorial
  • Ubuntu
  • Udemy Courses
  • Uncategorized
  • VirtualBox
  • Virtualization
  • VMware
  • VPN
  • VSCode Editor
  • Web Browsers
  • Web Design
  • Web Hosting
  • Web Servers
  • Webmin
  • Windows
  • Windows Subsystem
  • WordPress
  • Zabbix
  • Zentyal
  • Zorin OS
Visits
  • 3
  • 627
  • 1,055,399

DesignLinux.com © All rights reserved

Go to mobile version