logo
logo
Sign in

AWS ERROR 2003 (HY000): Can’t connect to MySQL server

avatar
Nikhila

Have trouble connecting to the MySQL server in AWS using error 2003 (HY000)? You can rely on us.


Mysql-server frequently returns an error message when a MySQL client tries to connect to a MySQL server via the AWS cloud.


As part of our Server Management Services, we frequently deal with requests from clients to correct similar errors here at Skynats. We'll see today how our support engineers take care of this for our clients.


Fixing AWS ERROR 2003 (HY000) failing to connect to the MySQL server


We will examine the causes of this error before moving on to the steps for correction.


A typical error might resemble the following:


RDS : ERROR 2003 (HY000): Can’t connect to MySQL server (10060)


Causes


This error indicates that the host where the MySQL client is currently running cannot receive inbound or outbound traffic from the AWS instance. To gain access to the RDS MySQL instance, a user must first register the public IP address in the RDS security groups.


How to fix this issue?


"RDS: ERROR 2003 (HY000): Can't connect to MySQL server (10060)" can be fixed by configuring public IP addresses in security groups.


The following are the configuration steps for public IP addresses in security groups:


  1. First, we must determine the public IP address of our host machine, on which MySQL-client is running.
  2. Add the public IP address for inbound traffic after that by visiting the security groups.
  3. The same entry will then be added for outbound traffic distributed by AWS services.
  4. As soon as the aforementioned entries are complete, we can update the security groups and test the connection using any mysql-client.


For instance, from any terminal where MySQL is configured, we can quickly test the connection by typing the following command:


mysql -h host-public-ip/DNS -P 3306 -u username -p password


collect
0
avatar
Nikhila
guide
Zupyak is the world’s largest content marketing community, with over 400 000 members and 3 million articles. Explore and get your content discovered.
Read more