Connecting to Amazon RDS instance through EC2 instance using MySQL Workbench

前端 未结 7 1145
囚心锁ツ
囚心锁ツ 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:41

    I recommend using SSH tunneling:

    1. Create putty session to the bastion host
    2. Under Connection --> SSH --> Tunnels, specify the Source port: 3306, Destination: yourRDSendpointname:3306
    3. Don't forget to click add!
    4. Connect to the bastion host with those settings
    5. Add a new connection in MySQL workbench and point it to your localhost port 3306 (assuming you aren't running anything on 3306 on your local client machine)
    6. Put in your username and password for your RDS instance

提交回复
热议问题