MySQL Upgrade from 8.0.4 to 8.4.x (AWS)

This document outlines the procedure for migrating an Amazon Web Services (AWS) Relational Database Service (RDS) instance from MySQL 8.0.4 to MySQL 8.4.x. The migration process is performed using the AWS RDS Modify DB Instance option. It ensures minimal downtime, data integrity, and compatibility with existing applications.

The procedure is designed for System Administrators, DevOps Engineers, and Database Administrators responsible for managing RDS-based MySQL deployments.

Prerequisites

Before starting the migration, ensure the following conditions are met:

  1. Application downtime preparation

    • Stop Tomcat services (or any dependent application services) that connect to the database.

  2. Database backup

    • Take a manual snapshot of the RDS instance before applying the upgrade.

    • Verify automated backups are enabled for recovery.

  3. Access requirements

    • AWS IAM permissions to modify RDS instances.

    • MySQL client installed on the administrator’s machine.

    • RDS endpoint, database username, and password.

Migration Steps

  1. Capture Current Database Size

    • Connect to the MySQL RDS instance and record the database size for validation after migration:

      mysql -h <RDS_ENDPOINT> -u <USERNAME> -p
    • Execute the following query:

      SELECT table_schema AS "Database",
             ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) AS "DB Size in MB"
      FROM information_schema.tables
      GROUP BY table_schema;

      Sample Reference Screenshot:

  1. Assess Current Setup

    • Identify the running RDS instance on MySQL 8.0.40.

    • Confirm instance class, storage type, allocated storage, parameter group, and option group configurations.

  2. Initiate Modification Process

    • Open the AWS Management Console → RDS Dashboard.

    • Select the target RDS instance.

    • Click Modify.

  3. Configure Instance Settings

    • In the DB Engine Version field, select MySQL 8.4.x as the target version.

    • Retain the existing master username and password.

    • Instance configuration (class, storage, connectivity) can remain unchanged unless capacity adjustments are required.

    • Update the appropriate Parameter Group and Option Group to be compatible with MySQL 8.4.

    • Define a suitable backup and maintenance window.

  4. Verify Configuration

    • Review all modifications carefully.

    • Click Continue to proceed.

  5. Apply Changes

    • Compare the current and new values.

    • Select Apply Immediately.

    • Click Modify DB Instance to trigger the upgrade.

  6. Wait for Migration

    • The upgrade may take 15–20 minutes, depending on instance size and workload.

    • During this period, the RDS status changes to 'modifying' and then returns to 'available' once the modification is complete.

  7. Confirm Migration

    • After the RDS instance becomes available:

      • Verify the MySQL version:

        mysql -h <RDS_ENDPOINT> -u <USERNAME> -p -e "SELECT VERSION();"

        Sample Reference Screenshot:

      • Validate database size matches pre-upgrade snapshot:

        SELECT table_schema AS "Database",
               ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) AS "DB Size in MB"
        FROM information_schema.tables
        GROUP BY table_schema;

        Sample Reference Screenshot:

  8. Restart Dependent Services

    • Start the Tomcat services or any dependent application services that were previously stopped.

    • Perform application-level validation to confirm successful connectivity and functionality.

Rollback Plan

If issues occur during or after the migration:

  • Restore from Snapshot

    • Navigate to RDS Console → Snapshots.

    • Select the pre-upgrade snapshot and restore it as a new RDS instance.

  • Reconfigure Applications

    • Point applications back to the restored RDS instance.

  • Investigate Upgrade Logs

    • Review RDS events and CloudWatch logs for error details.

Conclusion

The AWS RDS instance has been successfully migrated from MySQL 8.0.40 to MySQL 8.4.x. The upgrade process preserved data integrity, ensured compatibility with applications, and leveraged AWS RDS-managed features for high availability and reliability.


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

Last updated

Was this helpful?