Baron Schwartz a écrit :
> Hi,
> 
> Miguel Cardenas wrote:
>> Hello list
>>
>> I have a problem adding a user with host '%' ...
>>
>> *** If I add a user with host '%' when trying to connect get this error:
>> ERROR 1045 (28000): Access denied for user 'myuser'@'localhost' (using
>> password: YES)
>>
>> *** If I add the same user with localhost it connects and works fine...
>>
>> My specific doubt is:
>>
>> 1) do I need to add a same user with both '%' and 'localhost' to
>> connect locally and from another location???, or...
>>
>> 2) for some reason a host '%' is not working or need to do something
>> so it allows connections from any host?
> 
> Remember to quote the user and host carefully.  So,
> 
> GRANT ... TO 'user'@'%'
> 
> not
> 
> GRANT ... TO [EMAIL PROTECTED]
> 
> If you have doubts about what you actually granted, do this:
> 
> SHOW GRANTS FOR 'user'
> 
> And see what host it claims the permissions are for.  If you did it
> wrong, it will say no such user exists.  If you do all this and
> everything looks okay, write back to the list again and maybe we can
> help you more.
> 
> Oh, one more place to look is at the server configuration in /etc/my.cnf
> or equivalent, to be sure networking is configured right.  You want to
> check the bind-address and skip-networking settings.  You don't want
> skip-networking, and you want bind-address set to the machine's IP
> address.  Now that I think of it, this is more likely to be the problem
> for you.
> 
> Cheers
> Baron
> 


Localhost is indeed a special value that isn't include in '%'. It's a
feature not a bug ;)

Regards,

-- 
Mathieu Bruneau
aka ROunofF

===
GPG keys available @ http://rounoff.darktech.org

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to