How to Connect to AWS RDS
Let’s start with the connection of AWS RDS:
Connect to AWS RDS
To connect to the AWS RDS, you should have an AWS EC2 instance created. An EC2 instance list will be displayed in the “Instances” section on the left panel of the EC2 dashboard:
After that, simply click on the “Services” button. Then click on the “Database” section to open an “RDS” dashboard:
After that, you will be directed to the Amazon RDS dashboard. On the left panel, simply click on the “Databases” button and it will show you the list of all the created databases then simply click on the name of the database:
From there, you need to edit the security groups by adding the following ports for “MYSQL” access:
From the summary page of the RDS instance, you need the “Endpoint” for the connection command:
Now start with connecting the EC2 instance that you already have created by copying the command from the “Connect page” on the EC2 dashboard:
After connecting to the EC2 virtual machine you need to type the following command:
The command we used is written below:
Then it will ask for the password for your database simply enter the password and press enter:
You are now connected to the AWS RDS and to check the databases in the RDS you need to enter the following command:
This command will list all the databases created in the AWS RDS:
You have successfully connected to AWS RDS.
To connect to AWS RDS, you need to create an EC2 instance because your RDS database will be connected through the EC2 virtual machine. Then copy the endpoint of the database from the RDS dashboard and paste it into the connection command on the command prompt or PowerShell after this command is executed you will be asked to enter the password, and after that, RDS will be connected. In this post, you have learned how to connect to AWS RDS.