On Thu, 23 Aug 2001, Dave Walcott wrote:

> Greetings list,
>
> I'm having a MySQL login problem that I cannot figure out, and (surprise
> surprise), I'm something of a newcomer to MySQL.  I have read two decent
> MySQL books, searched the MySQL.com online manual, and searched the web for
> everything I can think of, to no avail.
>
> Here is my problem:
>
> I am running MySQL version 3.23.36 on a RedHat Linux 7.1 server.  I am
> using version 3.23.22-4 of the client.  I can log in to MySQL as root just
> fine by issuing:
>
> mysql -u root -p
>
> and then entering the admin password I set up.  Next, I create a database
> (and a few tables) called "dbname," and then issue (again as root):
>
> >grant all
> >on dbname.*
> >to user identified by 'password';

check the manual for more detail.  seems like you are missing the 'host'.
login using 'admin', connect to 'mysql' database and check the 'user'
table.  check the 'host' column for user 'user' to see what has been set
in the column.  if you are only connect to mysql from the machine you
installed mysql, update the column to 'localhost', else if you want to
connect to the database from anywhere, update it to '%'.


>
> I get a "Query OK" message.  Then when I logout and try to log back in using:
>
> >mysql -u user -p
>
> and then issuing the password, I get the following message:
>
> Error 1045: Access Denied for user: 'user@localhost' (Using password: YES)
>
> I have tried:
>
> 1.  restarting mysqld (several times)
> 2.  deleting and recreating the database and tables
> 3.  creating new users for each new attempt.
>
> Can anyone tell me why I can log in as admin but not as any other user that
> I create?
>
> Any help is much appreciated...
>

-- 
Alan Tai


---------------------------------------------------------------------
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