connect-aws-rds-mysql

How to Connect to AWS RDS MySQL

Amazon RDS makes it easy to run a MySQL database in the cloud. Once your RDS instance is up and running, you can connect to it from a local machine using tools like the MySQL command line client or database GUI tools such as MySQL Workbench. This guide shows you the steps to securely connect to your RDS MySQL database using the correct settings.

How to connect to AWS RDS MySQL

Step 1: Launch your RDS MySQL instance

If you haven’t already created an RDS instance, go to the RDS Dashboard in the AWS Console and click Create database. Here, choose MySQL as the engine and set your DB instance identifier, master username, and password.
You can choose Public access = Yes if you want to connect from outside AWS. Now, finish the setup and wait for the instance to become Available.

Step 2: Get the endpoint and port

Once the instance becomes available, go to RDS Dashboard > Databases, click on your RDS instance and copy the Endpoint (e.g., your-db-instance.abcdefg12345.us-east-1.rds.amazonaws.com). Also, make a note of the Port (default is 3306).

Step 3: Make sure the security group allows access

Go to EC2 Dashboard > Security Groups, find the security group associated with your RDS instance and edit the Inbound rules to allow MySQL/Aurora (port 3306). Now, set the source to your IP address or Anywhere (0.0.0.0/0) if for testing (not recommended for production).

Step 4: Use a MySQL client to connect

To connect, open your terminal and type the following command:

mysql -h your-endpoint.rds.amazonaws.com -P 3306 -u your-username -p

You’ll be prompted to enter your password. Once you do that, you’ll be connected to the database.

Pump saves ~60% on CLOUD *for free*

FAQ

Get started with PUMP for free

No contracts, no credit card needed to sign up

Get started with PUMP for free

No contracts, no credit card needed to sign up

Get started with PUMP for free

No contracts, no credit card needed to sign up

1390 Market Street, San Francisco, CA 94102

Made with

in San Francisco, CA

© All rights reserved. Pump Billing, Inc.