# MySQL 8.4.x on AWS

This article describes the steps to configure a **MySQL 8.4.x database on AWS RDS** for use with OvalEdge. The procedure covers RDS instance creation, parameter configuration, and schema setup.

**Audience:** System Administrators, DevOps Engineers, Database Administrators

## Prerequisites

Before starting the installation, ensure the following:

* **AWS Permissions**
  * IAM user/role with permissions to create and manage RDS instances, networking (VPC, Subnet Groups, Security Groups), and parameter groups.
* **Technical Knowledge**
  * Basic understanding of AWS networking concepts (VPC, Subnets, Security Groups).
  * Familiarity with MySQL administration.
* **Tools**
  * MySQL client installed on the local machine or bastion host.
  * Access to the **Masterscripts.sql** file provided by the OvalEdge team.

### Steps Involved

1. **Create a MySQL RDS Instance**
   * Log in to the [**AWS Management Console**](https://eu-north-1.signin.aws.amazon.com/oauth?client_id=arn%3Aaws%3Asignin%3A%3A%3Aconsole%2Fcanvas\&code_challenge=Pf0_a-fQXerL2wFLkJZcxA9wnjSYKrttmoqFrHQ_PJ4\&code_challenge_method=SHA-256\&response_type=code\&redirect_uri=https%3A%2F%2Fconsole.aws.amazon.com%2Fconsole%2Fhome%3FhashArgs%3D%2523%26isauthcode%3Dtrue%26nc2%3Dh_ct%26src%3Dheader-signin%26state%3DhashArgsFromTB_eu-north-1_af0dd427315d135e) and navigate to:\
     **RDS → Databases → Create Database**

     <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FPvKjQyzKGrHisteUD9rv%2F2.jpg?alt=media&#x26;token=f2e6f34f-3842-4ed1-9433-0a54f976358a" alt=""><figcaption></figcaption></figure>
   * Select **Standard Create** as the creation method.

     <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FdGAkh8bWcpbzX2svjJ1s%2F3.jpg?alt=media&#x26;token=5baf4c30-1627-4d3a-a976-5a11679b111d" alt=""><figcaption></figcaption></figure>
   * In **Engine Options**, choose **MySQL**.

     <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2F9FJsy8hgx44oCGthti8w%2F4.jpg?alt=media&#x26;token=ad66e1fd-7aea-4c44-86b2-0f31b55d228a" alt=""><figcaption></figcaption></figure>

     * **Recommended Version:** 8.4.x (Latest GA release)
   * Configure Templates, Availability, and Durability based on organizational requirements (e.g., **Multi-AZ** for high availability).

     <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FdGAq98TvGjs1B70STIug%2F5.jpg?alt=media&#x26;token=e7ee3018-3383-4758-88f8-bf534c78a562" alt=""><figcaption></figcaption></figure>
   * Provide database details:

     <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FiNcHh8cSMuAzH8wMzwDR%2F6.jpg?alt=media&#x26;token=298e0136-d64e-4fa2-b247-8054d2d75790" alt=""><figcaption></figcaption></figure>

     * **DB Identifier:** `<your-db-identifier>`
     * **Master Username:** `<username>`
     * **Password:** `<password>`
   * Select an **Instance Configuration** that meets workload requirements.

     <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2F9vwYSUMEHkX7vW0ISCg2%2F7.jpg?alt=media&#x26;token=60dd37b0-57db-42eb-a70d-e377f5f01886" alt=""><figcaption></figcaption></figure>

     * Example: `db.m6g.large` for medium workloads.
   * In **Storage**, configure:

     <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FbN3rPEnGp4AFQESCzwAs%2F8.jpg?alt=media&#x26;token=973ca087-11e4-4bea-a186-168c9ddd0401" alt=""><figcaption></figcaption></figure>

     * Storage type (e.g., **General Purpose SSD**)
     * Allocated storage size (e.g., **100 GB**, scalable as required).
   * **Configure Connectivity:**
     * Select the appropriate **VPC**, **Subnet group**, and **Security group** as per the Cloud/Networking team’s recommendations.

       <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FsPXBA1fMRKNZC4utVzEO%2F9.jpg?alt=media&#x26;token=d71d3a4e-cdc1-47c8-be8d-60344a9d48a6" alt=""><figcaption></figcaption></figure>

       <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2F6o5aKQKhhlOZFWyfo6bg%2F10.jpg?alt=media&#x26;token=5b15b0b6-1b96-4b49-a9f6-3ddd59f74eae" alt=""><figcaption></figcaption></figure>
     * Ensure that **MySQL (port 3306)** is open to the required application servers.
   * Under **Authentication**, select **Password Authentication**.

     <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2F9gtYOJNXFzcRRFXbKpL7%2F11.jpg?alt=media&#x26;token=97de56a7-a70f-495b-812c-e7d1dc34db50" alt=""><figcaption></figcaption></figure>
   * In **Additional Configuration:**
     * Set an initial database name if required.
     * Attach a new **DB Parameter Group** customized for OvalEdge.
   * Click **Create Database**.

     <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FRXvzZGLwa5TQoAgv3dDk%2F12.jpg?alt=media&#x26;token=e1b45298-8e6a-4738-8643-c1d8bb5625a1" alt=""><figcaption></figcaption></figure>

     ⚡ It will take a few minutes to create the RDS, and then it will display the **available** status.

     <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FRH7zKK9EtkmOHJVPt912%2F13.jpg?alt=media&#x26;token=41b1796c-452a-4a88-a133-7c379ff664c8" alt=""><figcaption></figcaption></figure>

2. **Retrieve Database Endpoint**
   * From the **RDS console**, select the newly created instance.<br>

     <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FFNMocF8Xw6SWCXn7Pt0N%2F14.jpg?alt=media&#x26;token=dce9aed6-8955-42bf-a08f-e3c1b8c15b34" alt=""><figcaption></figcaption></figure>
   * Copy the **Endpoint** value (host address).<br>

3. **Connect to the Database**
   * Run the following command from a system with the MySQL client installed:

     ```bash
     mysql -h <endpoint> -u <username> -p
     ```

     \
     *Sample Reference Screenshot:*

     <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2F6yMkHIeNF3QnNOBg9xNv%2F15.jpg?alt=media&#x26;token=ed5ebb95-a559-4554-845b-4ccc9c827ba8" alt=""><figcaption></figcaption></figure>

     * Replace `<endpoint>` with the RDS instance endpoint.
     * Enter the master password when prompted.

     #### **Error Handling Tip**

     If the connection fails, verify:

     * Security group inbound rules allow access from the client machine.
     * Correct endpoint, username, and password are used.
     * MySQL client version is compatible with **MySQL 8.4.x**.<br>

4. **Create OvalEdge Schema**
   * From the MySQL prompt, execute the OvalEdge **Masterscripts.sql** file:

     ```sql
     source <path_to_Masterscripts.sql>
     ```

     \
     *Sample Reference Screenshot:*

     <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2F3SEsKu9CugjygUKcOmV7%2F16.jpg?alt=media&#x26;token=3a8301f2-c25a-430b-b927-34b2f4cf583b" alt=""><figcaption></figcaption></figure>
   * Verify database creation with:

     ```sql
     SHOW DATABASES;
     ```

     \
     *Sample Reference Screenshot:*\
     ![](https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FtGIJUOdcppUqOKAhCx7l%2F17.jpg?alt=media\&token=0f7d63c9-6772-451f-a0b2-d626a21fc55b)

### Rollback Instructions

* **If incorrect parameters or instance class were selected:**
  * Delete the RDS instance from the AWS console.
  * Recreate with correct parameters.
* **If schema creation fails:**
  * Drop the failed database using:

    ```sql
    DROP DATABASE <schema_name>;
    ```
  * Re-run the **Masterscripts.sql** file.

***

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