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

Re: localhost.localdomain



On 9/23/05, Christoph Haas <haas@debian.org> wrote:
> On Fri, Sep 23, 2005 at 08:07:54PM +0200, Olaf van der Spek wrote:
> > On 9/23/05, Christoph Haas <haas@debian.org> wrote:
> > > 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 "127.0.0.1" and looks up "localhost.localdomain" which
> > > it cannot find since it expects "localhost".
> >
> > Put % in the host field and base authentication on passwords.
>
> http://dev.mysql.com/doc/mysql/en/connection-access.html reads:
>
> ---------------snip-----------------
> # A Host value may be a hostname or an IP number, or 'localhost' to
>        indicate the local host.
> # You can use the wildcard characters '%' and '_' in Host column values.
>        These have the same meaning as for pattern-matching operations performed
>        with the LIKE operator. For example, a Host value of '%' matches any
>        hostname, whereas a value of '%.mysql.com' matches any host in the
>        mysql.com domain.
> ---------------snap-----------------
>
> So 'localhost' means the current host and '%' is a wildcard for other
> hosts.

Eh? Why would % not match localhost?

> IIRC MySQL will not accept '%' if I connect from the same machine
> (unless I explicitly connect to an IP on an interface other than 'lo').



Reply to: