MySQL 8.4.x on RHEL 8+

This article provides a detailed procedure for installing and configuring MySQL 8.4.x on Red Hat Enterprise Linux (RHEL) 8 or 9 systems. It includes prerequisites, installation steps, initial setup, and recommended performance tuning parameters as per OvalEdge guidelines.

Prerequisites

Ensure the following conditions before starting the installation:

  • A virtual machine (VM) or server running RHEL 8.x or 9.x

  • A user account with sudo privileges

  • An active internet connection is required to download packages

  • SELinux and firewall considerations (adjust as per your security policies)

Installation Steps

  1. System Update

    • Update the system packages.

      sudo yum update -y

      Sample Reference Screenshot:

  1. Install Required Utilities

    • Install yum-utils to manage repositories.

      sudo yum install -y yum-utils

  1. Configure MySQL Repository

    • Download and install the official MySQL 8.4 repository RPM.

    • For RHEL 8:

      wget https://dev.mysql.com/get/mysql84-community-release-el8-1.noarch.rpm
      sudo rpm -ivh mysql84-community-release-el8-1.noarch.rpm
    • For RHEL 9:

      wget https://dev.mysql.com/get/mysql84-community-release-el9-1.noarch.rpm
      sudo rpm -ivh mysql84-community-release-el9-1.noarch.rpm

      Use the correct .rpm file based on the OS version.

      Sample Reference Screenshot:

  1. Disable Default MySQL Module

    • Disable the default MySQL module to avoid conflicts.

      sudo yum module disable -y mysql

      Sample Reference Screenshot:

  1. Install MySQL Server

    • Install the MySQL community server package.

      sudo yum localinstall -y mysql84-community-release-el8-1.noarch.rpm

      Sample Reference Screenshot:

  1. Start and Enable MySQL Service

    • Start the MySQL service and enable it to run at boot.

      sudo systemctl start mysqld
      sudo systemctl enable mysqld
      sudo systemctl status mysqld

      Sample Reference Screenshot:

    • Verify the installed version:

      mysql --version

      Sample Reference Screenshot:

  1. Retrieve Temporary Root Password

    • Check the MySQL log to retrieve the temporary root password.

      sudo grep 'temporary password' /var/log/mysqld.log

      Sample Reference Screenshot:

  1. Secure MySQL Installation

    • Log in to MySQL and configure the root account.

      mysql -u root -p

      Sample Reference Screenshot:

    • Run the following SQL commands:

      ALTER USER 'root'@'localhost' IDENTIFIED BY '<NewSecurePassword>';
      DELETE FROM mysql.user WHERE User='';
      DROP DATABASE IF EXISTS test;
      DELETE FROM mysql.db WHERE Db='test' OR Db='test_%';
      FLUSH PRIVILEGES;

      Replace <NewSecurePassword> with a strong, secure password.

      Sample Reference Screenshot:

  1. Apply Recommended Configuration

    • Edit the MySQL configuration file:

      sudo vi /etc/my.cnf
    • Append or update the following parameters:

      max_binlog_size=1G
      binlog_expire_logs_seconds=2592000
      group_concat_max_len=4294967295
      max_connections=600
      max_allowed_packet=1G
      bind-address=0.0.0.0
      innodb_buffer_pool_size=8G

      Sample Reference Screenshot:

      • Set bind-address=0.0.0.0 only if MySQL and the application reside on different VMs.

      • Adjust innodb_buffer_pool_size based on system RAM (typically 50%–70%).

  2. Restart MySQL Service

    • Apply the configuration changes by restarting the MySQL service.

      sudo systemctl restart mysqld
      sudo systemctl enable mysqld

      Sample Reference Screenshot:

OvalEdge Database Creation

  1. Import OvalEdge Schema

    • Place the MasterScripts.sql file (provided by the OvalEdge team) in the MySQL VM. Sample Reference Screenshot:

    • Connect to MySQL:

      mysql -u root -p

      Sample Reference Screenshot:

    • Run the script:

      SOURCE <path_to_MasterScripts.sql>;

      Replace <path_to_MasterScripts.sql> with the actual file path.

  1. Verify Database Creation

    • Check if the OvalEdge database has been created:

      SHOW DATABASES;

      Sample Reference Screenshot:

    • Expected output should include:

      • ovaledgedb


Copyright © 2025, OvalEdge LLC, Peachtree Corners, GA, USA.

Last updated

Was this helpful?