OS: RHEL 9
Step 1: Download and add the following MySQL Yum repository to install the latest version of MySQL.
wget https://repo.mysql.com/mysql80-community-release-el8-1.noarch.rpm
Step 2: After downloading the package for Linux platform, now install it using the following command.
yum localinstall mysql80-community-release-el8-1.noarch.rpm
Step 3: You can verify that the MySQL Yum repository has been successfully added by using the following command.
yum repolist enabled | grep "mysql.*-community.*"
Step 4: Install the latest version of MySQL (currently 8.0) using the following command.
yum install mysql-community-server
Step 5: After successfully installing of MySQL, start and enable the MySQL server with the following commands.
systemctl enable mysqld.service
systemctl start mysqld.service
systemctl status mysqld.service
Step 6: The MySQL_secure_installation command helps secure your to MySQL installation by configuring essential settings, such as setting the root password, removing anonymous users and disabling remote root login, and among other tasks.
Use the following command to view the current password before running MySQL secure command.
grep 'temporary password' /var/log/mysqld.log
Once you have the password, you can proceed to run the following command to secure your MySQL installation.
mysql_secure_installation
Enter new Root password, which is your temporary password from a file /var/log/mysqld.log
.
Step 7: Connect to the newly installed MySQL server by providing a username and password.
mysql -uroot -p
Step 8: Once the connection is working, execute the exit command to exit the MySQL query window.
Step 9: To set SQL mode.- Click here
Uncomment the following line in my.cnf file to stop bin log file generation in MySQL.
disable_log_bin
Related articles
Applicare database backup from the Windows to Linux machine.
Comments
0 comments
Article is closed for comments.