Can anyone explain localhost phenomenon?
Adam Tauno Williams
awilliam at whitemice.org
Mon Feb 4 08:24:57 EST 2013
On Mon, 2013-02-04 at 12:19 +0000, Charles Bradshaw wrote:
> On: Mon, 04 Feb 2013 06:29:56 -0500, Adam wrote:
> > On Sun, 2013-02-03 at 15:42 +0100, Gabor Gombas wrote:
> > > IIRC MySQL tries to use an UNIX socket instead of TCP for connecting to
> > > the server when it sees the "localhost" string. If e.g. sendmail runs
> > > chrooted, then it won't see the MySQL server's socket, therefore it
> > > won't be able to connect.
> > What happens if, instead of the literal "localhost", you say
> > "127.0.0.1". Hi-jacking the localhost string seems wrong, but it might
> > be accepted/well-known behavior at this point. And possibly buried
> > in the MySQL library [and not in SASL; in fact, I'd wager that is true.
> > Shortcuts and general funny-business is pretty much MySQL's primary
> > prerogative].
> Yes 127.0.0.1 instead of localhost works... it's down to somebodies ghost in
> the machine then!
<rant>
No, don't blame the ghosts, they are innocent. This behavior is the
fault of an idjit; somebody very much alive built that behavior into
libmysql, believing they were being clever. This HACK has cost hours to
innumerable people who assume what is in a config file means what it
obviously should mean - only it doesn't.
</rant>
--
Adam Tauno Williams GPG D95ED383
Systems Administrator, Python Developer, LPI / NCLA
More information about the Info-cyrus
mailing list