mysql,

How to install MySQL on Rocky Linux 8

Jul 30, 2021 · 1 min read · Post a comment
How to install MySQL on Rocky Linux 8

Installing MySQL on Rocky Linux it’s quite easy and quick. A lot of today’s applications are using MySQL as a web database. MySQL is an open source database and offers a lot of features.

Prerequisites

  • Rocky Linux 8
  • sudo access

Install MySQL on Rocky Linux 8

Step 1. Run system update command:

sudo dnf update

Step 2.you need to enable the MySQL AppStream module:

sudo dnf module enable mysql:8.0

Step 3. Install MySQL:

sudo dnf install @mysql

Step 4. Enable and start the MySQL service:

sudo systemctl enable --now mysqld
sudo systemctl start mysqld
sudo systemctl status mysqld

Step 5. To check the version execute:

mysql --version

Secure MySQL 8 on Rocky Linux 8

After installing the MySQL server, good practice is to secure the database server executing the following command:

sudo mysql_secure_installation

Conclusion

This tutorial shows you how to install and secure the latest MySQL version on Rocky Linux 8. Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on telegram.