Consider also the DNS TTL.
If you flush hosts in MySQL it'll ask again the OS to resolve a name , but
if that is still in the DNS cache it could return that 'old' value instead
of querying the newly updated NS.
I'm not sure thou, may be test by restarting the name server cache
2011/5/19 Johan De Meersman <vegivamp@stripped>
> Just encountered an interesting issue.
> I use DNS names instead of IPs in mysql grants. Yes, I'm aware of the
> performance impact, that's not an issue.
> I just found out through failing logins that a server was still connecting
> to an old DNS server, and properly updated the resolv.conf. Commandline host
> lookups then returned correct results.
> However, even after repeated flush hosts commands, the MySQL kept returning
> wrong results. Only after a full restart did it pick itself up and start
> doing proper lookups. I strongly suspect that this is due to it internally
> caching the nameserver, too, and not refreshing that along with the host
> cache on a flush hosts command.
> Can anyone confirm this is the case, and wether or not a bug has been
> logged about it? I can't seem to find one.
> Bier met grenadyn
> Is als mosterd by den wyn
> Sy die't drinkt, is eene kwezel
> Hy die't drinkt, is ras een ezel