List:General Discussion« Previous MessageNext Message »
From:Sasha Pachev Date:March 31 1999 1:11am
Subject:Re: [Shouldn't the hostname be given in the log file?]
View as plain text  
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)
Thread
[Shouldn't the hostname be given in the log file?]seth31 Mar
  • Re: [Shouldn't the hostname be given in the log file?]Sasha Pachev31 Mar
    • Re: [Shouldn't the hostname be given in the log file?]Seth Chaiklin31 Mar
    • Re: [Shouldn't the hostname be given in the log file?]Michael Widenius31 Mar
      • Re: [Shouldn't the hostname be given in the log file?]Seth Chaiklin31 Mar
        • Re: [Shouldn't the hostname be given in the log file?]Michael Widenius31 Mar