Connecting to Amazon RDS instance through EC2 instance using MySQL Workbench

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

    This is for UBUNTU Mysql workbench

    You must add an inbound rule to the security group linked with the RDS to accept requests on port 3306 from the bastion/jump/any instance(machine). The machine should have a public IP associated with it.

    Do confirm on your machine if you can connect with the RDS or not first, before trying to setup the SSH tunnel through MYSQL workbench.

    To test connectivity run:

    mysql -u{username} -p{password} -h ***-db-***.cmmaberpdqoc.***.rds.amazonaws.com -P 3306
    

    Replace {username}, {password} and host with your credentials.

    Follow the picture and you should be able to connect.

提交回复
热议问题