Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to connect MySQL Workbench to RDS instance

Am following this tutorial http://thoughtsandideas.wordpress.com/2012/05/17/monitoring-and-managing-amazon-rds-databases-using-mysql-workbench/

I am not able to Test DB Connection while creating new server instance to connect to the RDS database. It says Bad_Authentication[allowed_types=public_key], i have a tried different .pem files and have done through a lot of forums. I have also allowed access to my IP in the DB SecurityGroups for RDS and the Security Groups for EC2.

Please help me out. Thanks.

like image 777
Preaman Avatar asked May 10 '13 17:05

Preaman


2 Answers

This worked for me. Assuming you have logged into AWS:

  1. Go to RDS -> Databases -> Select your database

enter image description here

  1. Make sure the Public Accessibility value is Yes enter image description here

  2. Check your IP address using http://checkip.amazonaws.com/. If it is not added to the Security Rule Groups, you should add it. this step is crucial

3.1. Click on the rule name. This will open up a new tab, then click in the name of the rule.

enter image description here

3.2. Click on Edit inbound rules

enter image description here

3.3. Click on Add new rule, and add a rule with the following values:

Type: MYSQL/Aurora.

Protocol: TCP (default)

Port range: 3306 (default)

Source: My IP -> This will be the IP Address you got at http://checkip.amazonaws.com/.

enter image description here

  1. Fill information in MySQL Workbench

enter image description here

Hostname: Use the value you have for Endpoint at Connectivity and Security

Port: Use the value you have for Port at Connectivity and Security, by default it is 3306.

Username: Use the value you have for master username at Configuration

Password: Use the value you set when you created the database instance.

If you forgot the password, you can change it by clicking on Modify in your database instance)

enter image description here enter image description here

I hope this also helps you.

like image 125
lmiguelvargasf Avatar answered Nov 09 '22 22:11

lmiguelvargasf


For RDS no need to use ssh. You can directly connect the RDS with MySql workbench. Follow the following steps-

Make sure that in Security Group you should have provide access for MYSQL

  1. Open MySQL workbench and setup New Connection.
  2. Provide a Connection Name.
  3. Connection Method is set to Standard (TCP/IP)
  4. In the HostName provide your RDS end point
  5. Port is 3306
  6. Enter the username what you have given in the RDS.
  7. Test Connection, and provide the password. That's it. For Reference GoTo This Link
like image 25
Gaurav Barthwal Avatar answered Nov 10 '22 00:11

Gaurav Barthwal