At 11:51 -0400 6/14/03, David Shochat wrote:
This must be a very elementary question. I am a brand new user. I was able to set the root password and can connect as root with no problem. I created a database named remembrance. Where I got stuck was when I tried creating a user. I tried to do it this way (as root):

grant all on remembrance.* to david identified by '...';

(I put the password instead of ...).

Then I quit and tried:

mysql -u david -p

It prompted me for a password, but when I typed in the same password I had used in the grant command above, it was rejected. If I do:

mysql -u david

I get in fine (but oddly it does not prompt me for a password) but it then does not let me 'use remembrance'. I tried doing the grant again, this time using [EMAIL PROTECTED], but that didn't work either. In fact, it put '[EMAIL PROTECTED]' in the User column of the user table (I expected it to put 'david' in the User column and 'localhost' in the Host column).

This indicates that in the GRANT statement, you typed '[EMAIL PROTECTED]' rather than 'david'@'localhost' (the username and hostname should be quoted separately). Try it again with them quoted separately and the problem should go away.

It will also go away if you delete the anonymous user accounts:

% mysql -p -u root mysql
Enter password: (root password here)
mysql> DELETE FROM user WHERE User = '';
mysql> FLUSH PRIVILEGES;



What am I doing wrong? This is 3.23.54a which was included in RedHat Linux 9. -- David


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

Are you MySQL certified? http://www.mysql.com/certification/


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



Reply via email to