HeidiSQL can't connect to my RDS database?

Bushinos picture Bushinos · May 8, 2016 · Viewed 9.8k times · Source

Hoping someone can help me with this issue I am running into. HeidiSQL won't connect to my RDS database. I can connect to it when I'm on my EC2 instance but not using Heidi SQL. The error I keep getting is:

Can't connect to MySQL server on 'localhost' (10061).

Anyone know how to get HeidiSQL to work with RDS on AWS?

Answer

aCiD picture aCiD · Oct 15, 2018

Here is how I did it using MySQL(TCP/IP option)

  1. On Amazon RDS, set RDS instance to be publicly accessible. Go to Details -> Modify -> Network & Security -> Public accessibility -> Yes

  2. Modify Security Group to allow access to your IP.

    RDS Instance page -> Connect -> Security group rules -> Select Security Group -> Inbound ->Edit -> Add Rule -> Type = MYSQL/Aurora -> Protocol = TCP -> Port range =3306 -> Source = My IP -> Save

  3. On HeidiSql,

    New Session -> 
    
     Setting tab ->
    
        Network Type = MySQL (TCP/IP)
           Hostname/IP = your RDS instance endpoint
           User = RDS instance username
           Password = your password
           Port = 3306
           Compressed client/server protocol = yest
           Databases = your database name
    

    Hit Open

Instructions used from Connecting to a DB Instance Running the MySQL Database Engine

HeidiSQL has issues connecting via SSL using the certificate issued by AWS. I used Eclipse and its plugins for SSL connection.