Reputation: 7521
I created the RDS basically following the terraform example: https://www.terraform.io/intro/examples/index.html
I used existent VPC and when I create an instance in this VPC I can ssh using the SSH key file - cloudeng.pem
The MySQL terraform created the RDS with the endpoint demo-rds.abc.us-east-1.rds.amazonaws.com
.
So, I am trying to set the connection by MySQL workbench.
Workbench requires the following:
SSH Hostname: not sure how to set, tried `172.31.96.233` from ping `endpoint dmo-rds.abc.us-east-1.rds.amazonaws.com`
SSH Username: ec2-user
SSH Key file – cloudeng.pem
MySQL Hostname: endpoint dbmonitor-rds.cmufislueksi.us-east-1.rds.amazonaws.com
MySQL Server port: 3306
Username: dbmonitor_user
Password: password
I am getting Tunnel Connection Error
Upvotes: 0
Views: 2292
Reputation: 60084
I understand you question correctly you are trying to connect with RDS using SSH tunnel.
Before connecting to Workbench ssh tunnel I will recommend verifying SSH connection from the command line as it will give you more debug log.
ssh -i mykey.pem ec2-user@EC2_IP
Once you able to SSH
to ec2 instance then you are good to go with MySQL workbench.
Upvotes: 2
Reputation: 238747
I wish to ssh into the RDS
You can't SSH into RDS. AWS manages RDS instances and does not allow access to them, except for connecting to the database endpoint.
However, you can establish ssh tunnel from your instance to the endpoint, not ssh from inside of the RDS instance:
Upvotes: 2