AWS — RDS — Quick Start
A brief glimpse of what I was trying to do.
I was trying to create a MySQL Database in AWS RDS, and was trying to connect to it from a node app.
To access it from node, we need a database object which will look like this —
const mysql = require('mysql');const db = mysql.createConnection({host: 'XXXXXXXXXXXX.us-east-2.rds.amazonaws.com',port:'3306',user:'MASTER_USER_NAME',password:'YOUR_PASSWORD',});
It consists of whole code, using which you connect to DB in mysql.


So, Here are the following mappings —
- Host — is Endpoint in Image -1
- Port — 3306
- Username — Go to Configuration Tab (Image-2), in availability, find Master username. — I’ts your username.
- Password — is the one which was set while creating Instance. If you don’t know, you can simply reset.
To reset your password, go to modify (see fig-3)


- Scroll down to settings and set New Password. Scroll Down, and press continue.
- IMP — To reflect change immediately, choose Apply immediately.

- Then click on Modify DB Instance.
Also, don’t forget to choose Public accessibility as yes, under Network & Security, when you choose to modify DB instance.
If you are still facing problem in connecting, or node error like, Error: ER_ACCESS_DENIED_ERROR: Access denied for user ‘admin’@’12.34.56.789' (using password: YES), Then you may do the following.
Go to Connectivity & Security (Image-1) → Security → VPC Security Group → <Security Group ID(hyperlink) >
- Scroll down, click on Inbound rules → Edit Inbound Rule
- Click Add Rule. and select the following:
In Type — All Traffic
Source — Anywhere
- Click save rules.
Done. Now you are all set to connect to AWS RDS.
Thanks for reading.