Connecting to Amazon RDS MySql remotely
amazon-rds, amazon-web-services, mysql
Solution
I was having the same problem when using an RDS instance on a VPC that I wanted to connect to remotely. To fix the problem, I needed to do the following:
- Go to the VPC Management Console in AWS
- Go to Internet Gateways (on the left side)
- Create and attach an internet gateway to my VPC. Make note of the ID of this gateway.
- Go to Route Tables
- Edit the route table associated with the subnets associated with your RDS instance
- Add a route:
- Destination: 0.0.0.0/0
- Target: ID of your Internet Gateway
I didn't have this route in my table because I created my VPC manually and without using the wizard, but if you use the wizard it creates this route for you automatically.
Note: This assumes that your security groups are already configured to allow your IP to connect.
Problem
I'm trying to connect to MySql on Amazon RDS from my computer, using `MySql WorkBench`, or `HeidiSql` or even the `console Mysql.exe` and i'm getting this error all the time: `ERROR 2003 (HY000): Can't connect to MySQL server on 'MY-SERVER-NAME' (10060)` - In the Security group of the instance I created a new Inbound rule that allows all traffic, and applied it, and still - same error. - I have no active Firewall on my computer, and have good internet access - I am able to access the DB from the Amazon EC3 server, there I am connecting using HeidiSql, and the exact same settings (host, username, password) is just not working on my computer Still, nothing is working. I'm pretty sure that my security groups is configured to allow outside connections, as can be seen on the next screenshot, there is another place with firewall rules?