# MySQL Upgrade from 8.0 to 8.4.x  (Azure)

This article provides a step-by-step procedure for upgrading **Azure Database for MySQL** from version **8.0 to 8.4**.**x.** The upgrade ensures continued vendor support, access to the latest security patches, improved performance, and new features in MySQL 8.4.&#x20;

**System Administrators, Database Administrators, and DevOps Engineers** are responsible for managing and maintaining Azure-hosted MySQL services.

## Prerequisites

Before initiating the upgrade, ensure the following conditions are met:

* **Backups**
  * Take a full logical backup of all MySQL databases using `mysqldump` or `mysqlpump`.
  * Verify backup integrity and ensure restore capability.
* **Application Downtime Preparation**
  * Stop dependent application services (e.g., Apache Tomcat hosting OvalEdge or other applications).
  * Communicate planned downtime to stakeholders.
* **Access Requirements**
  * Ensure administrator-level access to the Azure portal and the Azure Database for MySQL service.
* **Pre-Migration Checks**
  * Run pre-migration scripts (if applicable to the environment).
  * Validate that no long-running queries or transactions are active.

### Upgrade Steps

1. **Log in to Azure**
   * Access the Azure portal at:\
     👉 [https://portal.azure.com](https://portal.azure.com/?utm_source=chatgpt.com)

     <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2Fb2b12tmbEIAeHQIFRPUV%2F2.jpg?alt=media&#x26;token=763865b9-4aa6-439e-af51-e4cb61f8b919" alt=""><figcaption></figcaption></figure>
   * Authenticate using appropriate credentials with access to Azure Database for MySQL.<br>

2. **Locate the MySQL Instance**
   * Navigate to **Azure Database for MySQL servers**.

     <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2Fn0lGAXh9WMbUD4WSe74e%2F3.jpg?alt=media&#x26;token=a632a21b-0409-4a7b-b9d3-3454fa267edc" alt=""><figcaption></figcaption></figure>
   * Select the target instance currently running MySQL **8.0**.<br>

3. **Initiate the Upgrade**
   * Go to **Overview** and click **Upgrade**.

     <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2Fg0gImSh57NRkIDZkTlE8%2F4.jpg?alt=media&#x26;token=0116e515-9df1-4820-a1bf-0ca33d96bb87" alt=""><figcaption></figcaption></figure>
   * Review the upgrade details and check the confirmation box. Click **Next.**

     <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2Fwjs7UU8N46Smk1DXjXjf%2F5.jpg?alt=media&#x26;token=1db94d23-7323-46be-b552-4cb1ccf8dfdb" alt=""><figcaption></figcaption></figure>
   * Preview the details and click **Next** to proceed.

     <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2F3GhoDSMYOv1zvfUdnleH%2F6.jpg?alt=media&#x26;token=2d8f91b0-b3bf-4a9e-9cb8-bc52fa1dca12" alt=""><figcaption></figcaption></figure>

     <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FN3gUOvs0vnH5jBpryL8K%2F7.jpg?alt=media&#x26;token=39ab7afa-5065-4cc6-925d-a9540e00489f" alt=""><figcaption></figcaption></figure>

4. **Confirm and Execute Upgrade**
   * Click **Upgrade** to start the process.

     <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FQflsPuvNGF0jbchpJSM5%2F8.jpg?alt=media&#x26;token=a8d5a8bf-3534-4dfc-805c-f4d47a263d75" alt=""><figcaption></figcaption></figure>
   * ⚠️ The operation may take several minutes.

     <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FaqeCYJZDIe2dNwc4Ae0Y%2F9.jpg?alt=media&#x26;token=55116fab-d2a3-47f6-ae77-d93d58920586" alt=""><figcaption></figcaption></figure>
   * During this period, the database service may be unavailable.<br>

5. **Verify Upgrade Completion**
   * Once the upgrade is complete, refresh the **Overview** page.

     <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FJLRcD9xDR1M4OCojvju5%2F10.jpg?alt=media&#x26;token=609bac3d-c5bf-42fb-9d34-ea338f80529b" alt=""><figcaption></figcaption></figure>
   * Confirm the server version is updated to **MySQL 8.4**.

     <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FDD2tF5kSMP4QLSxeCJYS%2F11.jpg?alt=media&#x26;token=141918e7-12bd-47c0-b7fc-f1018e4f1979" alt=""><figcaption></figcaption></figure>

### Post-Upgrade Steps

1. **Application Reconnection**
   * Update application configurations (if necessary) to point to the upgraded MySQL instance.
   * Restart dependent services (e.g., **Tomcat**).<br>
2. **Run Post-Migration Scripts**
   * Execute any required post-migration SQL scripts provided by the application or DBA team.<br>
3. **Validation**
   * Confirm application connectivity and functionality.
   * Check database logs for warnings or errors.
   * Run health checks on critical queries and stored procedures.

### Restore Backup

* If the MySQL upgrade to 8.4 fails:
  * The server will remain on MySQL 8.0.
  * Point the OE application back to the MySQL 8.0 instance and start the application.
* If issues persist after reconnecting to MySQL 8.0:
  * Create a new Azure MySQL instance with version 8.4.
  * Restore the pre-upgrade MySQL 8.0 backup to the new instance.

***

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