MySQL 8.4.x on Ubuntu 22.04+
This article provides a step-by-step guide to installing MySQL version 8.4.x on Ubuntu 22.04. It outlines the prerequisites, installation procedure, initial configuration, and tuning parameters recommended by OvalEdge to optimize database performance and compatibility. This guide is intended for system administrators, DevOps engineers, and database administrators deploying MySQL in enterprise environments.
Prerequisites
Before beginning the installation, ensure the following system and environment requirements are met:
Operating System: Ubuntu 22.04 LTS or later
Privileges: A user account with
sudoprivilegesNetwork: Stable internet connectivity on the target VM
Resources: Minimum 4 GB RAM (8 GB+ recommended for production)
Repository Access: Outbound access to
https://dev.mysql.com
Installation Steps
Update System Packages
Refresh the system package index to ensure the latest repository metadata is available:
sudo apt update -ySample Reference Screenshot

Download MySQL .deb Package
Download the MySQL APT configuration package from the official MySQL website:
wget https://dev.mysql.com/get/mysql-apt-config_0.8.34-1_all.debSample Reference Screenshot

Configure MySQL APT Repository
Install the downloaded package. During installation, select MySQL 8.4 when prompted:
sudo dpkg -i mysql-apt-config_0.8.34-1_all.debUse arrow keys and Enter to navigate and confirm selections in the package configuration UI.
Sample Reference Screenshot 01

Sample Reference Screenshot 02

Update Repository Information
Refresh the package list to include the MySQL APT repository:
sudo apt update -ySample Reference Screenshot

Install MySQL Server
Install the MySQL server package:
sudo apt-get install mysql-server -yDuring installation, the system will prompt for the root password. Set and confirm the password as per organizational policy.
Sample Reference Screenshot 01

Sample Reference Screenshot 02

Sample Reference Screenshot 03

Verify Installation
Check the MySQL version:
mysql --versionConnect to the MySQL shell:
mysql -u root -pExit the MySQL shell:
exit;Sample Reference Screenshot

Update MySQL Configuration Parameters
Open the MySQL server configuration file:
sudo vi /etc/mysql/mysql.conf.d/mysqld.cnfAdd or update the following parameters under the
[mysqld]section: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 and Enable MySQL Service
Apply the new configuration by restarting the MySQL service:
sudo systemctl restart mysql sudo systemctl enable mysqlSample Reference Screenshot

OvalEdge Database Initialization
Download MasterScripts
Transfer the MasterScripts SQL file provided by OvalEdge to the MySQL VM. Use
scp,wget, or other secure transfer methods.Example (using wget):
wget <Master_scripts_URL>Sample Reference Screenshot

Execute MasterScripts
Log in to MySQL:
mysql -u root -pSample Reference Screenshot

Within the MySQL prompt, run:
source <Path of MasterScripts file>Exit the MySQL shell:
exit;
Verify Database Creation
Reconnect to MySQL:
mysql -u root -pCheck that the required databases are created:
SHOW DATABASES;Sample Reference Screenshot

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

