Installation

MySQL Upgrade from 8.0.3 to 8.0.4

Upgrading MySQL from version 8.0.3 to 8.0.4x is a crucial task that should be performed with caution to avoid data loss. This guide outlines the steps to upgrade MySQL on an Ubuntu. It is essential to create a backup of your MySQL data before upgrading, ensuring you can restore it in case of any issues.


Please note that the provided commands and steps assume you have administrative privileges on the server and that you have already installed MySQL 8.0.3 on the system.


Step 1: Backup Your MySQL Database

Before starting the upgrade process, create a backup of your MySQL data using the mysqldump command:

Replace "root" with the appropriate MySQL user and enter the MySQL password when prompted. This command will create a SQL dump of all your databases and save it in the ovaledgedb.sql file.

Step 2: Backup MySQL Configuration File

Ensure to back up the MySQL configuration file before proceeding with the upgrade using “cp command”

Step 3: Check the database version.

Check the version of the database by logging into the MySQL database by using the below command.

Step 4: Check the Database Size (Optional)

If desired, you can check the size of your databases before the upgrade. Connect to the MySQL server and run the following query:

Step 5: Stop MySQL Server 8.0.3

Before the upgrade, stop the MySQL server 8.0.3 using systemctl:

Step 6: Update package manager

To install MySQL 8.0.4x, add the MySQL APT repository:

The packages are downloaded and if you want to download the package of any other version can visit the official website of MySQL.

Step 7: Upgrade MySQL packages

Install the package by using below command.

During upgrade process, it will take some time to install latest packages related to MySQL.

Step 7: Start MySQL services

After the upgrade, verify the MySQL version:

Then, log in to the MySQL server to check the version:

Step 8: Verify Database Size (Optional)

If desired, you can re-check the database sizes to ensure they are intact after the upgrade:

Once it is migrated to MySQL 8.0.4x start the tomcat server.


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