Re: Problem with GRANT ... 'user'@'%'

2007-05-22 Thread Mogens Melander
On my servers i'm using the 'user'@'localhost' for PHP apps. running on the local web-server. Those users allocated for web-apps can only connect to their specific DB from localhost. On Tue, May 22, 2007 03:19, Miguel Cardenas wrote: Localhost is indeed a special value that isn't include in '%'.

Re: Problem with GRANT ... 'user'@'%'

2007-05-21 Thread Miguel Cardenas
If you don't specify a hostname in SHOW GRANTS, '%' is assumed. My mistake for not telling you this before. If you enable networking, and connect with mysql -h 127.0.0.1 instead of mysql -h localhost Well, in fact 127.0.0.1 and localhost produce the same effect but by using

Re: Problem with GRANT ... 'user'@'%'

2007-05-21 Thread Miguel Cardenas
Localhost is indeed a special value that isn't include in '%'. It's a feature not a bug ;) Regards, Bingo! That was the point! If i connect to the server ip or server name it works perfectly, but if I try to connect to localhost it fails unless I add a new user specific to localhost :D

Re: Problem with GRANT ... 'user'@'%'

2007-05-21 Thread Miguel Cardenas
Hm, I didn't know that! I thought it was only a special value to the client tools, which I know will try to connect via socket on UNIX machines when they see 'localhost' but will try to connect via TCP/IP when they see '127.0.0.1'. Thanks for pointing this out! Baron In fact that was the

Re: Problem with GRANT ... 'user'@'%'

2007-05-20 Thread Mathieu Bruneau
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

Re: Problem with GRANT ... 'user'@'%'

2007-05-20 Thread Baron Schwartz
Mathieu Bruneau wrote: 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:

Re: Problem with GRANT ... 'user'@'%'

2007-05-20 Thread Miguel Cardenas
Remember to quote the user and host carefully. So, The quoting is okay, I tested again If you have doubts about what you actually granted, do this: SHOW GRANTS FOR 'user' I've sent this command: grant all on mydatabase.* to 'myuser'@'%' identified by 'mypass'; Then tested the show grants:

Re: Problem with GRANT ... 'user'@'%'

2007-05-20 Thread Mogens Melander
You are still missing the GRANT for 'myuser'@'localhost' On Mon, May 21, 2007 03:06, Miguel Cardenas wrote: Remember to quote the user and host carefully. So, The quoting is okay, I tested again If you have doubts about what you actually granted, do this: SHOW GRANTS FOR 'user' I've sent

Re: Problem with GRANT ... 'user'@'%'

2007-05-20 Thread Baron Schwartz
Hi, Miguel Cardenas wrote: Remember to quote the user and host carefully. So, The quoting is okay, I tested again If you have doubts about what you actually granted, do this: SHOW GRANTS FOR 'user' I've sent this command: grant all on mydatabase.* to 'myuser'@'%' identified by 'mypass';

Problem with GRANT ... 'user'@'%'

2007-05-19 Thread Miguel Cardenas
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

Re: Problem with GRANT ... 'user'@'%'

2007-05-19 Thread Baron Schwartz
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