Better late than never.... I believe the reason is because (at least on unix) if you connect to a database on the same machine (using -h localhost or just omitting the host) it will use the socket -- and therefore saying "host=localhost" is like saying "if they come from the unix socket", where as saying "host=IP" or "host=name" is like saying "if they come from the port and match the host".
It's extremely frustrating; in a heterogenous OS environment it can be even worse. Machines with more than one A record don't always show up the same way when they're connecting, so you can't just specify host=IP or host=name, but have to specify something like host=xxx.xxx.% or host=%.domain.com (or both, since I have no idea what controls whether or not the connection is seen as coming from ip or host -- I believe it's OS specific). It stinks, but we can wait until LDAP authentication comes along....see http://dev.mysql.com/tech-resources/faq.html#sec3 "SEC 3. Does MySQL 5.0 have built-in Authentication against LDAP directories? No. Support for external authentication methods is on the MySQL roadmap as a "rolling feature". This means that it is not a flagship feature, but will be implemented, development time permitting. Specific customer demand may change this scheduling. " -Sheeri On 6/20/06, John Bishop <[EMAIL PROTECTED]> wrote:
Is there a reason that '%' doesn't match 'localhost'? I recently spent more time than I care to admit tearing my hair out over this while setting up authorization for a user. I've looked at the link that James provided, which does at least mention this inconsistency, but it doesn't seem to give a reason for it. Anyone? James Barros wrote: > Never mind. > > I'll just go RTFM and quit bugging you guys on list with stuff > answered plain as day in > http://dev.mysql.com/doc/refman/5.1/en/adding-users.html > > Sorry. I'll go caffeinate myself before asking more stupid questions. > > On Jun 14, 2006, at 11:55 AM, James Barros wrote: > >> Hey guys, I'm running mysql 5.1.9 and I've got a user who's >> mysql.user host is set to "%" and can log in from any domain except >> localhost. if I change to localhost, and flush privileges they can >> log in. >> >> Is this intended behavior, or should % be inclusive of localhost? >> > -- John Bishop -- [EMAIL PROTECTED] Lone Star Internet -- +1 512 708-8006 -- http://lone-star.net -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]