Reputation: 7278
I have created a MySQL database using Amazon RDS with the following settings which is now in the available
state.
Engine: MySQL 5.6.39
DB instance class: db.t2.micro
I did not chose the production version and went on with the dev version.
I have installed MySQL workbench (version 6.3 64x community) on my macOS.
I follow Amazon's own instructions on how to connect to the server.
But upon clicking on Test Connection, I get the following error.
Upvotes: 2
Views: 4201
Reputation: 69705
I had a hard time trying to connect to an RDS using MYSQL Workbench. Assuming you have logged into AWS:
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.
3.2. Click on Edit inbound rules
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/.
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)
Upvotes: 6
Reputation: 8140
The most common error is not having allowed yourself access/not set to public accessibility.
Select Yes if you want EC2 instances and devices outside of the VPC hosting the DB instance to connect to the DB instance. If you select No, Amazon RDS will not assign a public IP address to the DB instance, and no EC2 instance or devices outside of the VPC will be able to connect. If you select Yes, you must also select one or more VPC security groups that specify which EC2 instances and devices can connect to the DB instance.
Upvotes: 7