When you use FLUSH HOSTS, MySQL will effectively imply that its record of which hosts are currently or recently connected is reset, allowing you to connect to those hosts once more.
As seen below, you can clear the host cache from the shell prompt without entering into MySQL. And doing so will assist in automating them at predetermined intervals.
Method-1:
mysql –host <rds-host-name> -u username -pPassword -e “FLUSH HOSTS;”;
Method-2:
mysqladmin –host <rds-host-name> -u username -pPassword flush-hosts;