2 Answers
- Newest
- Most votes
- Most comments
0
It turns out this was working the whole time, it's just the functionality to "test" the connection that was returning an error.
answered 10 months ago
0
Hi,
As explained in the MySQL documentation, The error "(2002) Can't connect to ..." means that one of the following:
- MySQL server is not running or is not reachable due to a firewall or port blocking service.
- MySQL client is using an incorrect Unix socket file name or TCP/IP port number when trying to connect to the server.
In the context of AWS, you can take the following actions to remediate to this issue:
- Make sure that the "Host" provided in the MWAA (Airflow) Connection corresponds to the RDS MySQL endpoint. A mistyped or incorrect endpoint could lead to connection issues.
- Verify that the RDS instance is in the "Available" state. If it's in a different state (e.g., creating, modifying, or in a failure state), it might not accept incoming connections.
- Ensure that the security group associated with your RDS MySQL instance allows inbound traffic from the MWAA instances on port 3306.
- Verify that there are no restrictions in network ACL (NACL) rules preventing communication between MWAA and RDS subnets.
- If you are using a custom DNS setup in your VPC, make sure that DNS resolution is properly configured to resolve the RDS endpoint MySQL correctly.
Best,
Mehdi B.
answered 10 months ago
Relevant content
- asked 2 years ago
- asked 7 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a month ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a month ago