'ERROR 2003 (HY000): Can't connect to MySQL server on AWS RDS
I created an external user with '%' hostname to allow remote access. I get the following error while connecting the local MySQL to remote AWS RDS:
ERROR 2003 (HY000): Can't connect to MySQL server on 'instance.cvxqy8tbi2bk.us-east-1.rds.amazonaws.com' (110).
I tried commenting the #bind-address = localhost but no solution.
Any pointers for this?
Solution 1:[1]
Anyone encountering this issue today should check out this YouTube video at around 6:05:
AWS RDS MySQL Database Setup | Step by Step Tutorial.
In a nutshell, you have to create a new inbound security rule to allow an external connection.
Solution 2:[2]
You should diagnose connection to ANY Mysql/Mariadb/RDS connection before changing any server parameter.
Always use this to check connection.
mysql -u username -p -h your_rds_instance_name
If connection fail, then check network connection(can you ping the instance name from your local system? ), i.e. firewall access, RDS Subnet rules, security groups rules. If the topics too advance for your, then follow the usual quickstart guidelines and tutorial.
Solution 3:[3]
I had the same problem. this solution: When you create database
in the Virtual private cloud (VPC), please choose "Create new VPC"
in the VPC security group, please choose "create new", don't choose "choose existing"
Solution 4:[4]
"I tried commenting the #bind-address = localhost but no solution. "
No you cannot just comment it out.
If you want to allow remote connections to the MySQL database then you need to bind to your network adapter and not localhost / the loopback adapter.
So you need to get your server IP then:
bind-address = the.srv.ip.is
This is a better question for Server Fault ;)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | showdev |
| Solution 2 | |
| Solution 3 | ?oàn Ngh?a |
| Solution 4 | Community |

