From: Claudio Nanni
Date: May 19 2011 10:33am
Subject: Re: Interesting bug/oversight
List-Archive: http://lists.mysql.com/mysql/225036
Message-Id:
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary=20cf301cc3c2e05b6b04a39e8a87
--20cf301cc3c2e05b6b04a39e8a87
Content-Type: text/plain; charset=ISO-8859-1
Johan,
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
deamon */etc/rc.d/init.d/nscd
restart *
Claudio
2011/5/19 Johan De Meersman
> 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
>
--
Claudio
--20cf301cc3c2e05b6b04a39e8a87--