• WordPress
  • cPanel
  • Softaculous
  • KVM Virtualization
  • Vmware Virtualization
  • Proxmox
Sunday, June 15, 2025
LinuxBoost
  • Home
  • Almalinux
  • CentOS
  • Debian
  • Fedora
  • Ubuntu
  • Red Hat Enterprise Linux
  • Rocky Linux
  • OpenSUSE
  • Arch Linux
  • Oracle Linux
No Result
View All Result
LinuxBoost
  • Home
  • Almalinux
  • CentOS
  • Debian
  • Fedora
  • Ubuntu
  • Red Hat Enterprise Linux
  • Rocky Linux
  • OpenSUSE
  • Arch Linux
  • Oracle Linux
LinuxBoost
  • Home
  • Almalinux
  • CentOS
  • Debian
  • Fedora
  • Ubuntu
  • Red Hat Enterprise Linux
  • Rocky Linux
  • OpenSUSE
  • Arch Linux
  • Oracle Linux

How to Install MariaDB on Rocky Linux

in Linux OS, Red Hat Enterprise Linux, Rocky Linux
How to Install MariaDB on Rocky Linux

Rocky Linux is a popular choice for server administrators, and one of the most widely-used applications on Linux servers is MariaDB. In this tutorial, we’ll guide you through of process how to install MariaDB on Rocky Linux system. MariaDB is a powerful, open-source database management system that offers high performance, reliability, and ease of use.

Prerequisites

Before we start, ensure that you have root access or a user account with sudo privileges. Also, make sure you have already installed Rocky Linux on your system. If you need help with setting up your Rocky Linux server, you can refer to some of our other tutorials:

  • How to Install PHP on Rocky Linux
  • How to Install FTP Server on Rocky Linux
  • How to Install Wget on Rocky Linux
  • How to Install Ruby on Rocky Linux

Once you have your Rocky Linux server up and running, you can proceed with the installation of MariaDB.

How to Install MariaDB on Rocky Linux

Update your system

First, update your system to the latest available packages. This can be done using the following command:

sudo dnf update -y

Install MariaDB on Rocky Linux

After updating your system, install MariaDB using the command:

sudo dnf install -y mariadb mariadb-server

This command will install the MariaDB server and client packages.

Start and enable MariaDB

Next, start the MariaDB service and enable it to start automatically upon system boot:

sudo systemctl start mariadb
sudo systemctl enable mariadb

You can check the status of the MariaDB service with the following command:

sudo systemctl status mariadb

Securing MariaDB installation

To enhance the security of your MariaDB installation, run the mysql_secure_installation script:

sudo mysql_secure_installation

This script will guide you through several steps, including:

  1. Setting a strong root password.
  2. Removing anonymous users.
  3. Disabling remote root login.
  4. Removing the test database.
  5. Reloading privilege tables.

Answer the prompts as shown below:

Enter current password for root (enter for none): [Press Enter]
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

Connect to MariaDB

You can now connect to your MariaDB server using the mysql command:

mysql -u root -p

Enter the password you set during the mysql_secure_installation process. Once connected, you can start creating databases and managing users.

Conclusion

Congratulations! You have successfully installed MariaDB on your Rocky Linux server. With MariaDB up and running, you can now use it to manage your databases, and applications, or even set up a LAMP stack on Rocky Linux. To further expand your server’s functionality, check out our other tutorials like How to Install phpMyAdmin on Rocky Linux and How to Install Git on Rocky Linux.

MariaDB is a versatile and powerful database management system that can handle a wide range of applications. By following this guide, you’ve taken the first step toward harnessing the power of MariaDB to improve your server’s capabilities. As you continue to explore and build on your Rocky Linux server, you’ll find that MariaDB is an invaluable tool for maintaining and scaling your projects.

For further reading, you might be interested in learning about:

  • How to Set Up an OpenVPN Server on Rocky Linux
  • How to Install BIND DNS Server on Rocky Linux
  • How to Install PostgreSQL on Rocky Linux
  • How to Set Up RAID 1 on Rocky Linux

As you continue to build and manage your server environment, you’ll find that Rocky Linux provides a reliable and stable foundation for your projects. With the addition of MariaDB and other powerful tools, you’ll be able to create a robust and efficient server that meets your specific needs.

ShareTweet
Previous Post

How to Install CSF on Rocky Linux

Next Post

How to Install MySQL on Rocky Linux

Related Posts

How to Install and Configure OpenVAS on Rocky Linux

How to Install and Configure OpenVAS on Rocky Linux

How to Install and Configure Nikto on Rocky Linux

How to Install and Configure Nikto on Rocky Linux

Set up FreeIPA on Rocky Linux

How to Install and Configure FreeIPA on Rocky Linux

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Golden Host VPS
  • Privacy Policy
  • Terms and Conditions
  • About Us
  • Contact Us

Copyright © 2023 linuxboost.com All Rights Reserved.

  • Privacy Policy
  • Terms and Conditions
  • About Us
  • Contact Us

Copyright © 2023 linuxboost.com All Rights Reserved.