Pallavi Varshney
Pallavi Varshney

Reputation: 1

Getting error while connecting to Amazon Aurora with MySQL Workbench

I am trying to create a table in Amazon Aurora. For this I am using MySQL Workbench. AWS RDS is not publically available and I have read on the Internet that it can't be made public. One way is to use bastion host to connect to the RDS. I tried MySQL Workbench with Connection method-"Standard(TCP/IP) over SSH" but after entering all information,another window pop up asking password to ec2 however i have not set root password of EC2 yet. Can anyone help me how to do this. When I am using Standard(TCP/IP) to connect to RDS getting below error- error

Upvotes: 0

Views: 1406

Answers (2)

Adiii
Adiii

Reputation: 59896

First of all, delete the screenshot and or hide you endpoint and user.

To understand the Error 10060

“Cannot connect to mysql server (10060)” error means that the connection established failed because the host connected has failed to respond in time.

But after entering all information,another window pop up asking password to ec2 however i have not set root password of EC2 yet.

Detail answer is given by John, but if you are using Workbench it asks for the password it means you missing to set private keys for your Bastion server.

Here is the configuration that you need, but before that try to confirm access otherwise it hard to debug the actual error from the workbench.

ssh -i your_bastion_key bastion_user@bastion_ip

once access is confirmed then do the following configuration in workbench.

enter image description here

fill the value properly and pass the DB password under DB password section.

Upvotes: 0

John Rotenstein
John Rotenstein

Reputation: 269091

An Amazon RDS instance can be configured to be publicly accessible:

  • When launching the instance:
    • Select Publicly accessible = Yes in the Additional connectivity configuration section
    • Launch the database in a public subnet
  • Configure the Security Group to allow incoming connections on the appropriate port from your IP address

If you do not wish for the instance to be publicly accessible, you can use port redirection via a Bastion server. It appears that you are using Windows, so you would configure the following:

  • Assumptions:
    • The Bastion server is a Linux instance
    • You are already able to login to the Bastion server using PuTTY
  • In PuTTY, go to Connection/SSH/Tunnels, then configure:
    • Source Port: 3306 (can actually be anything)
    • Destination: RDS-DNS-NAME:3306 (Substitute your RDS DNS Name)
    • Click Add
    • Open the SSH session as normal

This configuration will forward local port 3306 to the Bastion, which will forward it to port 3306 on the RDS instance. Make sure the Security Group on the database is allowing this connection from the Bastion (or from the CIDR range of the whole VPC).

Once PuTTY has connected with this configuration, point your SQL client to localhost:3306. It should then be connected through to the Amazon RDS database instance.

Upvotes: 1

Related Questions