Connecting to Amazon RDS instance through EC2 instance using MySQL Workbench

前端 未结 7 1115
囚心锁ツ
囚心锁ツ 2020-12-07 22:45

In AWS I have a VPC set up with a Bastion Host. The bastion host is a single EC2 instance with a public address trough which you can SSH to any other server on the VPC.

相关标签:
7条回答
  • 2020-12-07 23:50

    I've been struggling with something similar for weeks now. Just figured it out a few minutes ago.

    1. In mysql workbench, create a new server instance.
    2. For the remote host address, enter your endpoint address (i.e. xxxxxx.us-east-1.rds.amazonaws.com)
    3. For connection method, select "Standard TCP/IP over SSH"
    4. The SSH Hostname is the public DNS of your EC2 instance
    5. I specified ec2-user (I believe it varies by EC2 Instance type) as the username and then specified the downloaded key file corresponding to the key pair the instance was using.
    6. The mysql hostname is the endpoint of the RDS instance.
    7. The username is the username for the RDS instance (i.e. ebroot)

    Using that I was able to connect. However, I did not utilize VPC in my setup. Hope this helps. Good luck!

    0 讨论(0)
提交回复
热议问题