MySQL 8.4.x on Amazon Linux
This article provides a comprehensive guide for installing MySQL version 8.4.x on an Amazon Linux 2023 system. It covers the necessary prerequisites, step-by-step installation process, initial configuration, and performance optimization settings recommended by OvalEdge.
Prerequisites
Ensure the following before proceeding:
A user account with sudo privileges
A stable internet connection
Access to the MySQL VM where the installation will take place
Installation
Update System Packages
Log in to the MySQL virtual machine (VM) and run the following command to update the package manager:
sudo yum update -ySample Reference Screenshot:

Install Required Utilities
Official MySQL RPM package link: https://dev.mysql.com/get/mysql84-community-release-el9-1.noarch.rpm
Install the yum-utils package for managing repository configurations:
sudo yum install -y yum-utilsSample Reference Screenshot:

Download and Install the MySQL Yum Repository
Download the MySQL 8.4 Community Repository RPM package:
wget https://dev.mysql.com/get/mysql84-community-release-el9-1.noarch.rpmSample Reference Screenshot:

Install the repository package:
sudo yum localinstall -y mysql84-community-release-el9-1.noarch.rpmSample Reference Screenshot:

Install MySQL Server
Install the MySQL 8.4.x community server package:
sudo yum install -y mysql-community-serverSample Reference Screenshot:

Start and Enable MySQL Service
Start the MySQL service and enable it to start at boot using the following commands:
sudo systemctl start mysqld sudo systemctl enable mysqld sudo systemctl status mysqldSample Reference Screenshot:

Retrieve Temporary Root Password
MySQL generates a temporary root password upon initial startup. Retrieve it from the log file:
sudo vi /var/log/mysqld.logSample Reference Screenshot:

Search for the line containing temporary password.
Secure MySQL and Set Permanent Root Password
Log in to the MySQL shell using the temporary password:
mysql -u root -pSample Reference Screenshot:

Execute the following SQL commands to set a new root password and secure the installation:
ALTER USER 'root'@'localhost' IDENTIFIED BY '<new_secure_password>'; DELETE FROM mysql.user WHERE User=''; DROP DATABASE IF EXISTS test; DELETE FROM mysql.db WHERE Db='test' OR Db='test_%'; FLUSH PRIVILEGES;Sample Reference Screenshot:

Configure MySQL Parameters
Edit the MySQL configuration file to apply recommended settings:
sudo vi /etc/my.cnfAdd 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 = 8GSample Reference Screenshot:

Restart MySQL Service
Apply the configuration changes by restarting the MySQL service:
sudo systemctl restart mysqld sudo systemctl enable mysqldSample Reference Screenshot:

Create OvalEdge Database
Once the above steps are completed, download the MasterScripts file provided by the OvalEdge team in the MySQL VM, as shown below.

Transfer the MasterScripts SQL file (provided by OvalEdge) to the MySQL virtual machine.
Log in to MySQL:
mysql -u root -pRun the MasterScripts file using the
sourcecommand:source /path/to/MasterScripts.sql;Sample Reference Screenshot:

Verify the database creation:
SHOW DATABASES;Sample Reference Screenshot:

Copyright © 2025, OvalEdge LLC, Peachtree Corners, GA, USA.
Last updated
Was this helpful?

