My last email was technically correct, but not the root of your 
problem.  Please accept my humble apologies.

The answer to your problem is in the "MySQL" book by Paul DuBois, on page 
429.  If you do not have the book (and I highly recommend it), I will 
summarize.

This situation happens if your grant tables contain the default entries 
installed by the "mysql_install_db" initialization script.  It is caused by 
having anonymous users in your "user" table in the "mysql" database.  And, 
it only manifests itself when you are attempting to connect via the localhost.

To correct this problem, do this:

% mysql -u root mysql
mysql> DELETE FROM user where User="";
mysql> FLUSH PRIVILEGES;


If you have assigned a password to the root user (as I have done), you will 
have to do this:
% mysql -u root -p mysql
mysql> DELETE FROM user where User="";
mysql> FLUSH PRIVILEGES;


Again, sorry about my last email.


Sincerely,
Charles Quesenberry




At 02:13 PM 3/7/2002 -0800, you wrote:
>Hi,
>
>I assigned rights to a user in mysql,
>
>mysql> grant all on books.* to bookorama@localhost identified by
>'bookorama123';
>
>Then I tried to access mysql in as a regular user,
>
>[bookorama@a177 bookorama]$ mysql -u bookorama books -p;
>Enter password: bookorama123
>
>And I get the following error message,
>
>ERROR 1045: Access denied for user: 'bookorama@localhost' (Using password:
>YES)
>
>Would someone please help me how to troubleshoot this?
>
>Thanks,
>Norman
>
>
>
>---------------------------------------------------------------------
>Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail 
><[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to