How To Unblock AWS RDS Connections

Recently, I had a client site outage. AWS had a major EBS failure on Zone B, and one of the instances never recovered.
One of the major issues was the inability to connect to the RDS service:
1 2 3 |
# mysql -h yourDB.yourRDS.us-east-1.rds.amazonaws.com -u meyadmin -p Enter password: ERROR 1129 (00000): Host 'ip-X-X-X-X.ec2.internal' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' |
It turns out two steps were required for resolution:
1. Reboot the instance to get network access again
2. On another host, run the following mysqladmin command:
1 2 |
# mysqladmin -h yourDB.yourRDS.us-east-1.rds.amazonaws.com -u yourDBUser -p flush-hosts Enter password: |
Hi Eric,
I’m pretty sure that only one of the twop steps is required – when you restart the RDS instance it should flush hosts automatically, and you should be able to connect from a different instance and flush hosts even without restarting the instance.
Cheers,
Dave.