# 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="/files/VmAJqFpuSy5fM8DTgiUv" alt=""><figcaption></figcaption></figure>
   * Select **Standard Create** as the creation method.

     <figure><img src="/files/vPvRFKH22ko7AbNbXkif" alt=""><figcaption></figcaption></figure>
   * In **Engine Options**, choose **MySQL**.

     <figure><img src="/files/nfsDL3wltligFRTRX5xV" 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="/files/3ltLuCERvyoksX14NdX0" alt=""><figcaption></figcaption></figure>
   * Provide database details:

     <figure><img src="/files/ZqEUoxmIrbDcJj0nEEwK" 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="/files/mJvZno9XHhi63u4HIsDd" alt=""><figcaption></figcaption></figure>

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

     <figure><img src="/files/wE0Epj3ENSODq4vH5ruY" 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="/files/EezACaESi8ONrDMVcdgj" alt=""><figcaption></figcaption></figure>

       <figure><img src="/files/1H1t13hHcZhXDvZo74TY" alt=""><figcaption></figcaption></figure>
     * Ensure that **MySQL (port 3306)** is open to the required application servers.
   * Under **Authentication**, select **Password Authentication**.

     <figure><img src="/files/zqk2gSWXAVwx9U1D6yLn" 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="/files/3NFf8ECF9ss1KpvyTnEg" 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="/files/eT9pY3vYrenAjJQShr85" alt=""><figcaption></figcaption></figure>

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

     <figure><img src="/files/tF9PEK1ekzo2ZZJKYd1F" 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="/files/fFdnrtibd3NGGgswzFHQ" 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="/files/VyaJjDG7wjva0kHuHez8" alt=""><figcaption></figcaption></figure>
   * Verify database creation with:

     ```sql
     SHOW DATABASES;
     ```

     \
     *Sample Reference Screenshot:*\
     ![](/files/p2f02lOo1Xxzdz4pkL1y)

### 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ovaledge.com/release8.1/deployment-and-maintenance/installation/mysql-8.4.x-on-aws.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
