[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: localhost.localdomain

On Fri, Sep 23, 2005 at 04:59:52PM +0200, Gabor Gombas wrote:
> On Fri, Sep 23, 2005 at 02:47:58PM +0200, Christoph Haas wrote:
> > ..warning: connect to mysql server foobar: Access denied for user
> > 'whoever'@'localhost.localdomain' (using password: YES)
> Well, I had seen several machines having "
> localhost.localdomain localhost" in /etc/hosts and running MySQL without
> problems, so you could be a bit more specific about how do you get this
> error.

An example is running Postfix with MySQL lookups.

> > because it expected to resolve to the name "localhost".
> Expected by whom?

It appears like MySQL does that. It seems to check the IP address of the
connecting client to find the permissions in it's internal `users`
table. So it sees "" and looks up "localhost.localdomain" which
it cannot find since it expects "localhost".

> > Shouldn't it just be " localhost"? Or at most 
> > " localhost localhost.$myrealdomain"?
> The latter is completely wrong. First, there is no such thing as
> "myrealdomain". A machine may have multiple network interfaces, every
> interface may have multiple addresses, every address resolving to a
> different domain. You cannot even order them in any sensible way.

Then you can hoepfully tell why "localhost.localdomain" is right. I don't
see any references to "localdomain" in an RFC. So "localdomain" is no
real domain either.

> > Or should it rather be replaced during the installer's network base
> > configuration or the `base-config`? Or is the user supposed to change
> > "localdomain" to the real domain after the installation? Few people
> > actually seem to do that. :)
> They don't do that because that's wrong.

There is probably a reason why "localhost.localdomain" is listed there.
But if you claim my assumption is completely wrong you may want to give
pointers why "localdomain" is right - and what it's used for.

".signature" [Modified] 3 lines --100%--                3,41         All

Reply to: