Access an AWS RDS DB in a Private Subnet From MySQL Workbench
You put your database in a private subnet. How do you still “Connect to Database” from MySQL Workbench?
Published in
2 min readApr 19, 2019
Follow this procedure if you’ve already created an RDS instance in a private subnet and an EC2 instance in a public subnet:
- In MySQLWorkbench, click Connect to Database in the Database menu.
- As the Connection Method, select Standard TCP/IP over SSH.
- As the SSH Hostname, type the IPv4 Public IP of your EC2 instance.
- As the SSH Username, enter
ec2-user
. - As the SSH Key File, type the path to your EC2’s private key file.
- The MySQL Hostname is the Endpoint of your database instance.
- The Server Port is typically
3306
. It shows as Port in your DB instance. - Enter your database’s Username.
- Click Store in Keychain… to enter your database’s password.
- OK.
That’s it! If your RDS database isn’t in a private subnet yet, it’s time to ask…