ISSUE RESOLVED IN MY CASE:
I was running a docker container locally on OSX. I was trying to connect to an AWS RDS instance from inside my container, using the following command:
mysql -h aws-rds-endpoint -P 3306 -u master-username -p
this was failing resulting in the following error:
ERROR 2003 (HY000): Can’t connect to MySQL server on ‘aws-rds-endpoint.us-east-2.rds.amazonaws.com’ (111)
SOLUTION:
I found out that ‘Public Accessibility’ under ‘Connectivity’ for my RDS was set to ‘No’. I modified the setting to ‘Yes’, and it started working.