---
title: "How to Create a AWS RDS MySQL Database and Connect to it using MySQL Workbench"
lang: "en"
author: "Mohammad Abu Mattar"
canonical: https://mkabumattar.com/post/how-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench
---

![Blog post image for How to Create a AWS RDS MySQL Database and Connect to it using MySQL Workbench - RDS is a managed service that makes it easy to set up, operate, and scale a relational database in the cloud. It provides cost-efficient and resizable capacity while automating time-consuming administration tasks such as hardware provisioning, database setup, patching and backups. It frees you to focus on your applications so you can give them the fast performance, high availability, security, and compatibility they need.](/_astro/hero.BalpSU3D_ZJbJzj.webp)

[Home](/)›[Blog](/blog)›[All Categories](/blog/categories)›[AWS](/blog/categories/aws)

Blog

[Prev in AWSHow to Connect to AWS RDS MySQL Database to EC2 Instance With PHP By Using PDO](/blog/post/how-to-connect-to-aws-rds-mysql-database-to-ec2-instance-with-php-by-using-pdo)[Next in AWSHow To Create a AWS S3 Bucket Using AWS CLI](/blog/post/how-to-create-a-aws-s3-bucket-using-aws-cli)

[AWS](/blog/categories/aws)[RDS](/blog/categories/rds)[MySQL](/blog/categories/mysql)[Database Management](/blog/categories/database-management)[Cloud Computing](/blog/categories/cloud-computing)

# How to Create a AWS RDS MySQL Database and Connect to it using MySQL Workbench

[Mohammad Abu Mattar](/authors/mohammad-abu-mattar)Published: 07 Nov 202207 Mins read09 Mins listen

[Markdown for AI(opens in a new tab)](/post/how-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench/index.md "Open the plain-Markdown version of this page, for pasting into an AI tool")

TL;DR

RDS is a managed service that makes it easy to set up, operate, and scale a relational database in the cloud. It provides cost-efficient and resizable capacity while automating time-consuming administration tasks such as hardware provisioning, database setup, patching and backups. It frees you to focus on your applications so you can give them the fast performance, high availability, security, and compatibility they need.

Series

[AWS Automation](/series/aws-automation)2/6

[PreviousHow to Run an Apache Web Server Using Docker on an AWS EC2 Instance](/blog/post/how-to-run-an-apache-web-server-using-docker-on-an-aws-ec2-instance)[NextHow to Install and Configure Node.js on EC2 Instance Amazon Linux 2](/blog/post/how-to-install-and-configure-nodejs-on-ec2-instance-amazon-linux-2)

All posts in this series (6)

Blog6

1.  [How to Run an Apache Web Server Using Docker on an AWS EC2 Instance](/blog/post/how-to-run-an-apache-web-server-using-docker-on-an-aws-ec2-instance)
2.  [How to Create a AWS RDS MySQL Database and Connect to it using MySQL WorkbenchYou are here](/blog/post/how-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench)
3.  [How to Install and Configure Node.js on EC2 Instance Amazon Linux 2](/blog/post/how-to-install-and-configure-nodejs-on-ec2-instance-amazon-linux-2)
4.  [How to Connect to AWS RDS MySQL Database to EC2 Instance With PHP By Using PDO](/blog/post/how-to-connect-to-aws-rds-mysql-database-to-ec2-instance-with-php-by-using-pdo)
5.  [How To Connect A EBS Volume To An Windows EC2 Instance Using Powershell/GUI](/blog/post/how-to-connect-a-ebs-volume-to-an-windows-ec2-instance-using-powershell-gui)
6.  [Scaling Up, Staying Strong: Hands-On AWS CloudFormation Techniques for Building Resilient and Scalable Systems](/blog/post/scaling-up-staying-strong-hands-on-aws-cloudformation-techniques-for-building-resilient-and-scalable-systems)

### How to Create a AWS RDS MySQL Database and Connect to it using MySQL Workbench

Contents

[Introduction](#introduction)[Prerequisites](#prerequisites)[Create an AWS RDS MySQL database](#create-an-aws-rds-mysql-database)[Connect to the AWS RDS MySQL database](#connect-to-the-aws-rds-mysql-database)[Exercise 1: create a table](#exercise-1-create-a-table)[Create the SAILORS table](#create-the-sailors-table)[Create the BOATS table](#create-the-boats-table)[Create the RESERVES table](#create-the-reserves-table)[Insert data into the tables](#insert-data-into-the-tables)[Exercise 2: write queries](#exercise-2-write-queries)[Conclusion](#conclusion)[References](#references)

## [Introduction](#introduction)

RDS is a managed service that makes it easy to set up, operate, and scale a relational database in the cloud. It provides cost-efficient and resizable capacity while automating time-consuming administration tasks such as hardware provisioning, database setup, patching and backups. It frees you to focus on your applications so you can give them the fast performance, high availability, security, and compatibility they need.

## [Prerequisites](#prerequisites)

-   AWS Account
-   MySQL Workbench

## [Create an AWS RDS MySQL database](#create-an-aws-rds-mysql-database)

1.  Login to your AWS Console.

![AWS Console](/assets/blog/0017-how-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench/aws-console.png)

2.  Click on Services and then click on RDS.

![RDS](/assets/blog/0017-how-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench/rds.png)

3.  Click on Create Database.

![Create Database](/assets/blog/0017-how-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench/create-database.png)

4.  Select MySQL as the database engine.

![Select MySQL](/assets/blog/0017-how-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench/select-mysql.png)

5.  Select the MySQL version.

![Select MySQL Version](/assets/blog/0017-how-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench/select-mysql-version.png)

6.  Select the template.

![Select Template](/assets/blog/0017-how-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench/select-template.png)

7.  DB instance identifier.

![DB Instance Identifier](/assets/blog/0017-how-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench/db-instance-identifier.png)

8.  Master username and password.

![Master Username and Password](/assets/blog/0017-how-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench/master-username-and-password.png)

9.  DB instance class.

![DB Instance Class](/assets/blog/0017-how-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench/db-instance-class.png)

10.  Storage.

![Storage](/assets/blog/0017-how-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench/storage.png)

11.  Public access.

![Public Access](/assets/blog/0017-how-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench/public-acces.png)

12.  VPC security group.

![VPC Security Group](/assets/blog/0017-how-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench/vpc-security-group.png)

13.  Additional configuration.

![Additional Configuration](/assets/blog/0017-how-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench/additional-configuration.png)

14.  Click on Create database.

## [Connect to the AWS RDS MySQL database](#connect-to-the-aws-rds-mysql-database)

1.  Get the endpoint of the database.

![Get Endpoint](/assets/blog/0017-how-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench/get-endpoint.png)

2.  Open MySQL Workbench.

![Open MySQL Workbench](/assets/blog/0017-how-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench/open-mysql-workbench.png)

3.  Click on the + icon to add a new connection.

![Add New Connection](/assets/blog/0017-how-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench/add-new-connection.png)

4.  Enter the connection details.
    -   Connection Name: Enter a name for the connection.
    -   Hostname: Enter the endpoint of the database.
    -   Username: Enter the username of the database.
    -   Password: Enter the password of the database.

![Enter Connection Details](/assets/blog/0017-how-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench/enter-connection-details.png)

5.  Click on Test Connection to test the connection.
    
6.  Click on OK to save the connection.
    
7.  Click on the connection to connect to the database.
    

You have successfully connected to the AWS RDS MySQL database.

## [Exercise 1: create a table](#exercise-1-create-a-table)

Create three tables in the database:

-   `SAILORS` - Contains the details of the sailors.
    -   `SID` - The ID of the sailor.
    -   `SName` - The name of the sailor.
    -   `SRating` - The rating of the sailor.
    -   `SAge` - The age of the sailor.
-   `BOATS` - Contains the details of the boats.
    -   `BID` - The ID of the boat.
    -   `BName` - The name of the boat.
    -   `BColor` - The color of the boat.
-   `RESERVES` - Contains the details of the reservations.
    -   `SID` - The ID of the sailor.
    -   `BID` - The ID of the boat.
    -   `Day` - The day of the reservation.

Click to expand the SQL solution.

### [Create the SAILORS table](#create-the-sailors-table)

```
1CREATE TABLE `SAI`.`SAILORS` (2    SID int auto_increment primary key,3    SName varchar(30) not null,4    SRating int default 0 check (SRating >= 0 and SRating <= 10),5    SAge real default 18 check (SAge >= 18 and SAge <= 70)6);
```

Explanation:

Click to expand the explanation.

-   `SID` - The ID of the sailor.
-   `SName` - The name of the sailor.
-   `SRating` - The rating of the sailor.
-   `SAge` - The age of the sailor.
-   `auto_increment` - The ID will be automatically incremented.
-   `primary key` - The ID is the primary key of the table.
-   `not null` - The name of the sailor cannot be null.
-   `default 0` - The rating of the sailor will be 0 by default.
-   `check (SRating >= 0 and SRating <= 10)` - The rating of the sailor must be between 0 and 10.
-   `default 18` - The age of the sailor will be 18 by default.
-   `check (SAge >= 18 and SAge <= 70)` - The age of the sailor must be between 18 and 70.

### [Create the BOATS table](#create-the-boats-table)

```
1CREATE TABLE `SAI`.`BOATS` (2    BID int auto_increment primary key,3    BName varchar(30) not null,4    BColor varchar(30) not null5);
```

Explanation:

Click to expand the explanation.

-   `BID` - The ID of the boat.
-   `BName` - The name of the boat.
-   `BColor` - The color of the boat.
-   `auto_increment` - The ID will be automatically incremented.
-   `primary key` - The ID is the primary key of the table.
-   `not null` - The name of the boat cannot be null.

### [Create the RESERVES table](#create-the-reserves-table)

```
1CREATE TABLE `SAI`.`RESERVES` (2    SID int not null,3    BID int not null,4    Day date not null,5    primary key (SID, BID, Day),6);7
8alter table `SAI`.`RESERVES` add constraint `RESERVES_SAILORS_FK` foreign key (SID) references `SAI`.`SAILORS` (SID);9alter table `SAI`.`RESERVES` add constraint `RESERVES_BOATS_FK` foreign key (BID) references `SAI`.`BOATS` (BID);
```

Explanation:

Click to expand the explanation.

-   `SID` - The ID of the sailor.
-   `BID` - The ID of the boat.
-   `Day` - The day of the reservation.
-   `primary key (SID, BID, Day)` - The combination of the ID of the sailor, the ID of the boat and the day is the primary key of the table.
-   `not null` - The ID of the sailor, the ID of the boat and the day cannot be null.
-   `alter table` - Add a foreign key to the table.
-   `RESERVES_SAILORS_FK` - The name of the foreign key.
-   `foreign key (SID)` - The ID of the sailor is the foreign key.
-   `references` - References the `SAILORS` table.
-   `RESERVES_BOATS_FK` - The name of the foreign key.
-   `foreign key (BID)` - The ID of the boat is the foreign key.
-   `references` - References the `BOATS` table.

### [Insert data into the tables](#insert-data-into-the-tables)

Click to expand the SQL solution.

```
1insert into `SAI`.`SAILORS` (SID, SName, SRating, SAge) values (22, 'Dustin', 7, 45);2insert into `SAI`.`SAILORS` (SID, SName, SRating, SAge) values (29, 'Brutus', 1, 33);3insert into `SAI`.`SAILORS` (SID, SName, SRating, SAge) values (31, 'Lubber', 8, 55.5);4insert into `SAI`.`SAILORS` (SID, SName, SRating, SAge) values (32, 'Andy', 8, 25);5insert into `SAI`.`SAILORS` (SID, SName, SRating, SAge) values (58, 'Rusty', 10, 35);6insert into `SAI`.`SAILORS` (SID, SName, SRating, SAge) values (64, 'Horatio', 7, 35);7insert into `SAI`.`SAILORS` (SID, SName, SRating, SAge) values (71, 'Zorba', 10, 18);8insert into `SAI`.`SAILORS` (SID, SName, SRating, SAge) values (74, 'Horatio', 9, 40);9insert into `SAI`.`SAILORS` (SID, SName, SRating, SAge) values (85, 'Art', 3, 25.5);10insert into `SAI`.`SAILORS` (SID, SName, SRating, SAge) values (88, 'Bob', 3, 63.5);11
12insert into `SAI`.`BOATS` (BID, BName, BColor) values (101, 'Interlake', 'blue');13insert into `SAI`.`BOATS` (BID, BName, BColor) values (102, 'Interlake', 'red');14insert into `SAI`.`BOATS` (BID, BName, BColor) values (103, 'Clipper', 'green');15insert into `SAI`.`BOATS` (BID, BName, BColor) values (104, 'Marine', 'red');16
17insert into `SAI`.`RESERVES` (SID, BID, Day) values (22, 101, '1998-10-10');18insert into `SAI`.`RESERVES` (SID, BID, Day) values (22, 102, '1998-10-10');19insert into `SAI`.`RESERVES` (SID, BID, Day) values (22, 103, '1998-10-8');20insert into `SAI`.`RESERVES` (SID, BID, Day) values (22, 104, '1998-10-7');21insert into `SAI`.`RESERVES` (SID, BID, Day) values (31, 102, '1998-11-10');22insert into `SAI`.`RESERVES` (SID, BID, Day) values (31, 103, '1998-11-6');23insert into `SAI`.`RESERVES` (SID, BID, Day) values (31, 104, '1998-11-12');24insert into `SAI`.`RESERVES` (SID, BID, Day) values (64, 101, '1998-9-5');25insert into `SAI`.`RESERVES` (SID, BID, Day) values (64, 102, '1998-9-8');26insert into `SAI`.`RESERVES` (SID, BID, Day) values (64, 103, '1998-9-8');
```

## [Exercise 2: write queries](#exercise-2-write-queries)

-   Find all information of sailors who have reserved boat number 101.
-   Find the names of sailors who have reserved a red boat, and list in the order of age.
-   Find the names of sailors who have reserved at least one boat.
-   Find the ids and names of sailors who have reserved two different boats on the same day.
-   Find the ids of sailors who have reserved a red boat or a green boat.

Click to expand the SQL solution.

```
1select * from `SAI`.`SAILORS`2where SID in (3    select SID from `SAI`.`RESERVES`4    where BID = 1015);
```

Explanation:

Click to expand the explanation.

-   `select *` - Select all columns.
-   `from` - From the `SAILORS` table.
-   `where` - Where the ID of the sailor is in the list of IDs of sailors who have reserved boat number 101.
-   `SID in` - The ID of the sailor is in the list.
-   `select SID` - Select the ID of the sailor.
-   `from` - From the `RESERVES` table.
-   `where` - Where the ID of the boat is 101.

```
1select SName from `SAI`.`SAILORS`2WHERE SID in (3    select SID from `SAI`.`RESERVES`4    WHERE BID in (5        select BID from `SAI`.`BOATS`6        WHERE BColor = 'red'7    )8)9order by SAge;
```

Explanation:

Click to expand the explanation.

-   `select SName` - Select the name of the sailor.
-   `from` - From the `SAILORS` table.
-   `where` - Where the ID of the sailor is in the list of IDs of sailors who have reserved a red boat.
-   `SID in` - The ID of the sailor is in the list.
-   `select SID` - Select the ID of the sailor.
-   `from` - From the `RESERVES` table.
-   `where` - Where the ID of the boat is in the list of IDs of red boats.
-   `BID in` - The ID of the boat is in the list.
-   `select BID` - Select the ID of the boat.
-   `from` - From the `BOATS` table.
-   `where` - Where the color of the boat is red.
-   `order by` - Order by the age of the sailor.

```
1select SName from `SAI`.`SAILORS`2where SID in (3    select SID from `SAI`.`RESERVES`4);
```

Explanation:

Click to expand the explanation.

-   `select SName` - Select the name of the sailor.
-   `from` - From the `SAILORS` table.
-   `where` - Where the ID of the sailor is in the list of IDs of sailors who have reserved a boat.
-   `SID in` - The ID of the sailor is in the list.
-   `select SID` - Select the ID of the sailor.
-   `from` - From the `RESERVES` table.

```
1select SID from `SAI`.`SAILORS`2where SID in (3    select SID from `SAI`.`RESERVES`4    group by SID, Day5    having count(*) = 26);
```

Explanation:

Click to expand the explanation.

-   `select SID` - Select the ID of the sailor.
-   `from` - From the `SAILORS` table.
-   `where` - Where the ID of the sailor is in the list of IDs of sailors who have reserved two boats on the same day.
-   `SID in` - The ID of the sailor is in the list.
-   `select SID` - Select the ID of the sailor.
-   `from` - From the `RESERVES` table.
-   `group by` - Group by the ID of the sailor and the day.
-   `having` - Having the count of the number of boats reserved is 2.

```
1select SID from `SAI`.`SAILORS`2where SID in (3    select SID from `SAI`.`RESERVES`4    where BID in (5        select BID from `SAI`.`BOATS`6        where BColor = 'red'7    )8)9or SID in (10    select SID from `SAI`.`RESERVES`11    where BID in (12        select BID from `SAI`.`BOATS`13        where BColor = 'green'14    )15);
```

Explanation:

Click to expand the explanation.

-   `select SID` - Select the ID of the sailor.
-   `from` - From the `SAILORS` table.
-   `where` - Where the ID of the sailor is in the list of IDs of sailors who have reserved a red boat or a green boat.
-   `SID in` - The ID of the sailor is in the list.
-   `select SID` - Select the ID of the sailor.
-   `from` - From the `RESERVES` table.
-   `where` - Where the ID of the boat is in the list of IDs of red boats or green boats.
-   `BID in` - The ID of the boat is in the list.
-   `select BID` - Select the ID of the boat.
-   `from` - From the `BOATS` table.
-   `where` - Where the color of the boat is red or green.

## [Conclusion](#conclusion)

In this tutorial, you learned how to create an RDS instance, how to connect to it, and how to create a database and tables. You also learned how to insert data into the tables and how to write queries to retrieve data from the tables. You can use these skills to create a database for your own projects.

## [References](#references)

-   [Amazon RDS User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Welcome.html)
-   [Creating an Amazon RDS DB instance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CreateDBInstance.html)
-   [Connecting to a DB instance running the MySQL database engine](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ConnectToInstance.html)
-   [MySQL Workbench Manual](https://dev.mysql.com/doc/workbench/en/)
-   [MySQL 8.0 Reference Manual](https://dev.mysql.com/doc/refman/8.0/en/)
-   [SQL Tutorial - W3Schools](https://www.w3schools.com/sql/)
-   [Amazon RDS for MySQL](https://aws.amazon.com/rds/mysql/)
-   [Security in Amazon RDS](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Welcome.html#Welcome.Security)
-   [VPC security groups](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html) (Relevant for RDS access)
-   [MySQL CREATE TABLE Statement](https://dev.mysql.com/doc/refman/8.0/en/create-table.html)
-   [MySQL INSERT Statement](https://dev.mysql.com/doc/refman/8.0/en/insert.html)
-   [MySQL SELECT Statement](https://dev.mysql.com/doc/refman/8.0/en/select.html)
-   [MySQL Foreign Key Constraints](https://dev.mysql.com/doc/refman/8.0/en/create-table-foreign-keys.html)
-   [AWS Console Home](https://aws.amazon.com/console/)

Was this useful?

## Tags

[#AWS RDS Setup](/blog/tags/aws-rds-setup)[#MySQL Workbench Connection](/blog/tags/mysql-workbench-connection)[#Relational Database](/blog/tags/relational-database)[#SQL](/blog/tags/sql)[#Database Administration](/blog/tags/database-administration)[#AWS Console](/blog/tags/aws-console)[#Cloud Database](/blog/tags/cloud-database)

## Share

[Facebook](https://facebook.com/sharer/sharer.php?u=https%3A%2F%2Fmkabumattar.com%2Fblog%2Fpost%2Fhow-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench "Share on Facebook")[Twitter](https://twitter.com/intent/tweet/?text=How%20to%20Create%20a%20AWS%20RDS%20MySQL%20Database%20and%20Connect%20to%20it%20using%20MySQL%20Workbench&url=https%3A%2F%2Fmkabumattar.com%2Fblog%2Fpost%2Fhow-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench "Share on Twitter")[LinkedIn](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fmkabumattar.com%2Fblog%2Fpost%2Fhow-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench&title=How%20to%20Create%20a%20AWS%20RDS%20MySQL%20Database%20and%20Connect%20to%20it%20using%20MySQL%20Workbench&summary=RDS%20is%20a%20managed%20service%20that%20makes%20it%20easy%20to%20set%20up%2C%20operate%2C%20and%20scale%20a%20relational%20database%20in%20the%20cloud.%20It%20provides%20cost-efficient%20and%20resizable%20capacity%20while%20automating%20time-consuming%20administration%20tasks%20such%20as%20hardware%20provisioning%2C%20database%20setup%2C%20patching%20and%20backups.%20It%20frees%20you%20to%20focus%20on%20your%20applications%20so%20you%20can%20give%20them%20the%20fast%20performance%2C%20high%20availability%2C%20security%2C%20and%20compatibility%20they%20need.&source=https://mkabumattar.com "Share on LinkedIn")[WhatsApp](https://wa.me/?text=How%20to%20Create%20a%20AWS%20RDS%20MySQL%20Database%20and%20Connect%20to%20it%20using%20MySQL%20Workbench%20https%3A%2F%2Fmkabumattar.com%2Fblog%2Fpost%2Fhow-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench "Share on WhatsApp")[Telegram](https://t.me/share/url?url=https%3A%2F%2Fmkabumattar.com%2Fblog%2Fpost%2Fhow-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench&text=How%20to%20Create%20a%20AWS%20RDS%20MySQL%20Database%20and%20Connect%20to%20it%20using%20MySQL%20Workbench "Share on Telegram")[Reddit](https://www.reddit.com/submit?url=https%3A%2F%2Fmkabumattar.com%2Fblog%2Fpost%2Fhow-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench&title=How%20to%20Create%20a%20AWS%20RDS%20MySQL%20Database%20and%20Connect%20to%20it%20using%20MySQL%20Workbench "Share on Reddit")[Hacker News](http://news.ycombinator.com/submitlink?u=https%3A%2F%2Fmkabumattar.com%2Fblog%2Fpost%2Fhow-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench&t=How%20to%20Create%20a%20AWS%20RDS%20MySQL%20Database%20and%20Connect%20to%20it%20using%20MySQL%20Workbench "Share on Hacker News")[Pinterest](https://pinterest.com/pin/create/button/?url=https%3A%2F%2Fmkabumattar.com%2Fblog%2Fpost%2Fhow-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench&media=&description=RDS%20is%20a%20managed%20service%20that%20makes%20it%20easy%20to%20set%20up%2C%20operate%2C%20and%20scale%20a%20relational%20database%20in%20the%20cloud.%20It%20provides%20cost-efficient%20and%20resizable%20capacity%20while%20automating%20time-consuming%20administration%20tasks%20such%20as%20hardware%20provisioning%2C%20database%20setup%2C%20patching%20and%20backups.%20It%20frees%20you%20to%20focus%20on%20your%20applications%20so%20you%20can%20give%20them%20the%20fast%20performance%2C%20high%20availability%2C%20security%2C%20and%20compatibility%20they%20need. "Share on Pinterest")[Email](<mailto:?subject=How%20to%20Create%20a%20AWS%20RDS%20MySQL%20Database%20and%20Connect%20to%20it%20using%20MySQL%20Workbench&body=Check out this article: https%3A%2F%2Fmkabumattar.com%2Fblog%2Fpost%2Fhow-to-create-a-aws-rds-mysql-database-and-connect-to-it-using-mysql-workbench>)

## Comments

## You might also enjoy

More posts on similar topics

[![How to Connect to AWS RDS MySQL Database to EC2 Instance With PHP By Using PDO](/_astro/hero.BbyjrsxP_xhG8d.webp)](/blog/post/how-to-connect-to-aws-rds-mysql-database-to-ec2-instance-with-php-by-using-pdo)

## [How to Connect to AWS RDS MySQL Database to EC2 Instance With PHP By Using PDO](/blog/post/how-to-connect-to-aws-rds-mysql-database-to-ec2-instance-with-php-by-using-pdo)

-   [Mohammad Abu Mattar](/authors/mohammad-abu-mattar)
-   [AWS](/blog/categories/aws)
-   [RDS](/blog/categories/rds)
-   [EC2](/blog/categories/ec2)
-   [PHP](/blog/categories/php)
-   [MySQL](/blog/categories/mysql)
-   [Database](/blog/categories/database)

Introduction In this post, we will learn how to connect an AWS RDS MySQL database to an EC2 instance with PHP, using PDO. PrerequisitesAWS Account EC2 Instance Amazon Linux 2 RDS MySQL

[#AWS RDS MySQL](/blog/tags/aws-rds-mysql)[#EC2 PHP PDO](/blog/tags/ec2-php-pdo)[#Database Connection](/blog/tags/database-connection)+5 tags

[read more](/blog/post/how-to-connect-to-aws-rds-mysql-database-to-ec2-instance-with-php-by-using-pdo)

[![How To Connect A EBS Volume To An Windows EC2 Instance Using Powershell/GUI](/_astro/hero.CPGBv147_1yKKK8.webp)](/blog/post/how-to-connect-a-ebs-volume-to-an-windows-ec2-instance-using-powershell-gui)

## [How To Connect A EBS Volume To An Windows EC2 Instance Using Powershell/GUI](/blog/post/how-to-connect-a-ebs-volume-to-an-windows-ec2-instance-using-powershell-gui)

-   [Mohammad Abu Mattar](/authors/mohammad-abu-mattar)
-   [AWS](/blog/categories/aws)
-   [Windows Server](/blog/categories/windows-server)
-   [EC2](/blog/categories/ec2)
-   [EBS](/blog/categories/ebs)
-   [PowerShell](/blog/categories/powershell)

Introduction In this post, we will learn how to connect an EBS volume to a Windows EC2 instance using PowerShell or the Disk Management GUI, and how to mount the volume on the instance. Prereq

[#AWS EBS](/blog/tags/aws-ebs)[#Windows EC2](/blog/tags/windows-ec2)[#Attach EBS Volume](/blog/tags/attach-ebs-volume)+5 tags

[read more](/blog/post/how-to-connect-a-ebs-volume-to-an-windows-ec2-instance-using-powershell-gui)

[![Scaling Up, Staying Strong: Hands-On AWS CloudFormation Techniques for Building Resilient and Scalable Systems](/_astro/hero.CoOFXLCa_Z2wwlfS.webp)](/blog/post/scaling-up-staying-strong-hands-on-aws-cloudformation-techniques-for-building-resilient-and-scalable-systems)

## [Scaling Up, Staying Strong: Hands-On AWS CloudFormation Techniques for Building Resilient and Scalable Systems](/blog/post/scaling-up-staying-strong-hands-on-aws-cloudformation-techniques-for-building-resilient-and-scalable-systems)

-   [Mohammad Abu Mattar](/authors/mohammad-abu-mattar)
-   [AWS](/blog/categories/aws)
-   [Cloud Computing](/blog/categories/cloud-computing)
-   [DevOps](/blog/categories/devops)
-   [Infrastructure as Code](/blog/categories/infrastructure-as-code)
-   [Scalability](/blog/categories/scalability)
-   [Resilience](/blog/categories/resilience)

Introduction Building resilient and scalable systems matters for businesses that need to meet growing demand and maintain high availability. Cloud native architecture, combined with the capabiliti

[#AWS CloudFormation](/blog/tags/aws-cloudformation)[#IaC](/blog/tags/iac)[#Scalable Systems](/blog/tags/scalable-systems)+7 tags

[read more](/blog/post/scaling-up-staying-strong-hands-on-aws-cloudformation-techniques-for-building-resilient-and-scalable-systems)

[![How to Run an Apache Web Server Using Docker on an AWS EC2 Instance](/_astro/hero.WA3H4xsW_KuMrf.webp)](/blog/post/how-to-run-an-apache-web-server-using-docker-on-an-aws-ec2-instance)

## [How to Run an Apache Web Server Using Docker on an AWS EC2 Instance](/blog/post/how-to-run-an-apache-web-server-using-docker-on-an-aws-ec2-instance)

-   [Mohammad Abu Mattar](/authors/mohammad-abu-mattar)
-   [AWS](/blog/categories/aws)
-   [EC2](/blog/categories/ec2)
-   [Docker](/blog/categories/docker)
-   [Apache](/blog/categories/apache)
-   [Web Server](/blog/categories/web-server)

Introduction In this post, we will learn how to run an Apache web server using Docker on an AWS EC2 instance. We will use the following tools:AWS EC2 \[Docker\](

[#AWS EC2 Docker](/blog/tags/aws-ec2-docker)[#Apache Docker](/blog/tags/apache-docker)[#Containerization](/blog/tags/containerization)+4 tags

[read more](/blog/post/how-to-run-an-apache-web-server-using-docker-on-an-aws-ec2-instance)

[![How to Install and Configure Node.js on EC2 Instance Amazon Linux 2](/_astro/hero.CIYv_zEL_2aFueX.webp)](/blog/post/how-to-install-and-configure-nodejs-on-ec2-instance-amazon-linux-2)

## [How to Install and Configure Node.js on EC2 Instance Amazon Linux 2](/blog/post/how-to-install-and-configure-nodejs-on-ec2-instance-amazon-linux-2)

-   [Mohammad Abu Mattar](/authors/mohammad-abu-mattar)
-   [AWS](/blog/categories/aws)
-   [EC2](/blog/categories/ec2)
-   [Node.js](/blog/categories/nodejs)
-   [Linux](/blog/categories/linux)

Introduction Node.js does not exist in the default Amazon Linux 2 repository. So, we need to add the Node.js repository to the system. In this post, we will learn how to install and configure Node

[#Node.js Installation](/blog/tags/nodejs-installation)[#Amazon Linux 2](/blog/tags/amazon-linux-2)[#AWS EC2 Setup](/blog/tags/aws-ec2-setup)+3 tags

[read more](/blog/post/how-to-install-and-configure-nodejs-on-ec2-instance-amazon-linux-2)

[![How To Connect A Two EC2 Instances Database and Files Transfer Using AWS CLI](/_astro/hero.839lq2GB_1XSap0.webp)](/blog/post/how-to-connect-a-two-ec2-instances-database-and-files-transfer-using-aws-cli)

## [How To Connect A Two EC2 Instances Database and Files Transfer Using AWS CLI](/blog/post/how-to-connect-a-two-ec2-instances-database-and-files-transfer-using-aws-cli)

-   [Mohammad Abu Mattar](/authors/mohammad-abu-mattar)
-   [AWS](/blog/categories/aws)
-   [EC2](/blog/categories/ec2)
-   [EBS](/blog/categories/ebs)
-   [EFS](/blog/categories/efs)
-   [Database](/blog/categories/database)
-   [Networking](/blog/categories/networking)

Introduction In this post, I will show you how to share a database and files between two EC2 instances using AWS CLI. I will use AWS CLI to create a VPC, EC2 instances, EBS, EFS, and security grou

[#AWS CLI](/blog/tags/aws-cli)[#EC2 Instance Communication](/blog/tags/ec2-instance-communication)[#EBS Volume](/blog/tags/ebs-volume)+7 tags

[read more](/blog/post/how-to-connect-a-two-ec2-instances-database-and-files-transfer-using-aws-cli)

6 related posts
