# OvalEdge DB on AWS RDS

This article provides step-by-step instructions to provision an AWS MySQL-compatible RDS instance for the OvalEdge platform. It includes prerequisites, database creation, schema setup, and execution of OvalEdge database scripts to prepare the backend for application deployment.

## Prerequisites

Ensure the following requirements are met before starting the setup:

* **AWS Account Access**: An active AWS account with permissions to create and manage RDS resources.
* **AWS Management Console Access**: Ability to log in and navigate to the RDS service.
* **MySQL Client or GUI Tool Installed**: Tools such as MySQL Workbench, DBeaver, or the MySQL CLI should be available on your local machine or EC2 instance.

## Create MySQL Database in RDS

Follow the steps below to provision a new MySQL-compatible RDS instance:

1. Log in to the **AWS Management Console** and navigate to **RDS**.
2. Click **Create database**.

   <figure><img src="/files/PlMESVRKxH6q1kRaVIM1" alt=""><figcaption></figcaption></figure>
3. Select **Standard Create**.

   <figure><img src="/files/bA8Rwn9hb6gJYwihVb2q" alt=""><figcaption></figcaption></figure>
4. Choose **MariaDB** as the engine.

   <figure><img src="/files/F42NjB2mY2mREjr1Mk1V" alt=""><figcaption></figcaption></figure>
5. Under **Version**, select the latest available in the **8.4.x** series.

   <figure><img src="/files/lrqJeb5fllMxaMy2AWNY" alt=""><figcaption></figcaption></figure>
6. Select a **template** based on workload (e.g., *Production* or *Dev/Test*).

   <figure><img src="/files/GIVgVbCRroQkuRbYiEnA" alt=""><figcaption></figcaption></figure>
7. Enter a **DB instance identifier** (e.g., `ovaledge-db`).

   <figure><img src="/files/bK9JkCnjw6OzdglqimOH" alt=""><figcaption></figcaption></figure>
8. Set the **Master username**, then either:
   * Auto-generate the password, or
   * Enter a custom secure password.

     <figure><img src="/files/O8VRG4RkdNyucIX6O4OP" alt=""><figcaption></figcaption></figure>
9. Choose the desired **DB instance class** (e.g., `db.t3.medium`) based on performance needs.

   <figure><img src="/files/wWqzSbhp0HwRk622sTV8" alt=""><figcaption></figcaption></figure>
10. Configure **Storage type** and allocate a minimum of **100 GB**.<br>

    <figure><img src="/files/P8lHethNdUq3sMgpqJGC" alt=""><figcaption></figcaption></figure>
11. Under **Connectivity**, configure VPC, subnet group, and security groups as required.<br>
12. Expand **Additional Configuration** and set any custom DB parameters.<br>

    <figure><img src="/files/rF2QQEESEMANxY0xrWxK" alt=""><figcaption></figcaption></figure>
13. Set **Public access** to **Yes** if remote connections are required.<br>

    <figure><img src="/files/fFjpRHfx13MJjZgi2LGW" alt=""><figcaption></figcaption></figure>
14. Click **Create Database**.

### Create OvalEdge Schema

Once the RDS instance is available:

1. Copy the **endpoint** from the RDS dashboard.<br>

   <figure><img src="/files/NswQ1JXx49XvO24ZJFKc" alt=""><figcaption></figcaption></figure>

   <figure><img src="/files/DunrcZHvUSXVKyPsvnUq" alt=""><figcaption></figcaption></figure>
2. Connect to the instance using a database client (e.g., MySQL CLI):

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

## Download and Execute OvalEdge DB Scripts

1. Ensure the **OvalEdge DB scripts** are available on the EC2 instance (typically located under `$HOME/ovaledge/`).
2. Connect to the RDS instance using MySQL CLI:<br>

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

   <figure><img src="/files/RzkBFwoW3Tw48qTbuAUm" alt=""><figcaption></figcaption></figure>
3. After logging in, execute the **master script**:<br>

   ```bash
   source /home/ec2-user/ovaledge/MasterScripts.sql;
   ```

   <figure><img src="/files/l1qUG8LxbASrW2PPBl0n" alt=""><figcaption></figcaption></figure>
4. Verify schema creation:

   ```sql
   show databases;
   ```

   The database **`ovaledgedb`** should be listed, confirming successful script execution.<br>

   <figure><img src="/files/yPwYcw7tvikYrvZnOd3B" alt=""><figcaption></figcaption></figure>

***

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/ovaledge-db-on-aws-rds.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.
