MySQL Secure Installation on RHEL 8: Root Password Prompt
In this article, we will discuss the crucial steps to secure your MySQL installation on RHEL 8, specifically focusing on the root password prompt. We will guide you through a detailed context of the topic, covering key concepts and subtitles.
Prerequisites
Ensure you have a fresh installation of MySQL on your RHEL 8 system. Follow the steps mentioned in the following resources to install MySQL:
Initial Configuration
After installing MySQL, you need to perform the initial setup. Execute the following command to start the MySQL secure installation script:
sudo mysql_secure_installationThis script will prompt you to answer several questions for securing your installation.
Root Password Prompt
The first prompt you will encounter is related to the root password:
Enter current password for root (enter for none):
As this is a brand new installation, you have not set the root password yet. So, press Enter to continue.
Set root password? [Y/n]
Type Y and then press Enter, to set up a root password. Now, you will see the following prompt:
New password:
Enter the desired password and then press Enter. Next, you'll be prompted to re-enter the new password:
Re-enter new password:
Re-enter your desired password, press Enter, and the installation script will validate your entry. If the passwords match and meet the complexity requirements, the installation will proceed with the following message:
Password updated successfully!
Additional Security Steps
After configuring the root password, the installation script will prompt you for additional security configuration steps. Go through these steps to ensure the security of your MySQL installation.
- A brand new MySQL installation on RHEL 8 should start with executing the
mysql_secure_installationscript. - When prompted for the root password, press Enter if you have not yet set the password.
- Type
Yand follow the prompts to set the new root password. - Complete the remaining security configuration steps provided by the installation script.