From: Sasha Pachev Date: March 31 1999 1:11am Subject: Re: [Shouldn't the hostname be given in the log file?] List-Archive: http://lists.mysql.com/mysql/1216 Message-Id: <3701765C.8C7E9721@direct1.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit seth@stripped wrote: > > >Description: > If I connect to my MySQL server from a remote host, > then no hostname (or ip number) is provided after the > @ in the log file. For example: > > 990330 12:38:43 769 Connect seth@ on > > Maybe this explains is why the host field in the user table > in the mysql database is not working. > > But is this a problem that is related to resolveip and > the problems with pre-complied glibc binaries on Linux? > But if so, then how will one be able to validate remotehosts? I have not looked at the sources of mysql that do the logging, but I thinks the problem is that mysql relies on the hostent structure returned by gethostbyaddr() called with the IP obtained from getpeername() . hostent will be NULL if the DNS does not have a working inverse lookup. Try nslookup ip_of_trouble_host to see if the reverse lookups are working. I am amlost 100% sure they are not in your situation either because of DNS misconfiguration or because your /etc/resolv.conf points to a DNS server that is down. Patching this should be easy, only a couple of extra lines. -- Sasha Pachev http://www.sashanet.com/ (home) http://www.direct1.com/ (work)