Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RDS Aurora Proxy connection fails with "Failed to Connect to MySQL"

So basically - I've enabled RDS Proxy (still in Preview) for my Aurora MySQL DB and the Proxy is created and available for use.

  1. The Proxy uses a DB User/Pwd combination sourced from Secrets Manager to connect to the MySQL DB.

  2. The Proxy can be accessed without Authentication (IAM role based authentication is supported but I've not configured it yet).

When I connect to the proxy endpoint it fails with "Failed to Connect to MySQL" on my MySQL client and on the Cloudwatch logs for the Proxy I see the following 2 lines for each connection attempt..

[INFO] [clientConnection=3488645722] New client connection from 10.XX.XX.XX:63344 [INFO] [clientConnection=3488645722] Client connection closed. Reason: Internal error.

Cloudwatch Metrics just reports increase in ClientConnectionsReceived metric for each connection attempt and no change to the ClientConnectionsClosed metric.

So basically I am clueless as to why the client connection is getting closed.. Any hints/clues would be much appreciated..

like image 469
kiran01bm Avatar asked Jan 20 '26 09:01

kiran01bm


1 Answers

Try one of those:

  1. Ensure your user is created in the RDS Database. Test that you able to connect directly with that user.

  2. Ensure RDS proxy security group is whitelisted in the RDS security group.

  3. On the secrets manager ensure you've selected the right RDS database.

like image 52
Moryachok Avatar answered Jan 22 '26 23:01

Moryachok



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!