Eldon,

It looks like you have left in the records with a blank username for
"localhost" and for "UtilServer".

The following description is taken from
http://www.mysql.com/doc/en/Connection_access.html and my own
experimentation to validate that this works on Windows, too.

The authentication system matches based on most specific host name first.
Using your user table, let's say that user testit wants to connect from
localhost.

The sorted user table (sorted by host, user desc), looks like this:

Localhost       root
Localhost       <blank>
UtilServer      root
UtilServer      <blank>
%               testit

The authentication tries to match the [EMAIL PROTECTED] So first, it sees it
if matches with [EMAIL PROTECTED] Finds no match. Goes to the next:
<[EMAIL PROTECTED] Unfortunately, this matches, so that's how you're logged
it. If you do

mysql> select current_user();

you should see that you're connected as "%localhost", with no username.
Given your user table, that user has no rights.

For the purpose of experimentation, delete the rows in the user table that
have no username. You should see that things work as you expect.

mysql> delete from user where user = "";
mysql> flush privileges;
mysql> quit;


See also http://www.mysql.com/doc/en/Miscellaneous_functions.html. Compare
the CURRENT_USER() function with the USER() function. CURRENT_USER() gives
you the name you were authenticated as.

-ms


-----Original Message-----
From: Eldon Ziegler [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 02, 2003 3:56 AM
To: Michael Shulman
Subject: RE: password not working from command line

Michael,

The result of a SELECT * INTO OUTFILE  FROM user is attached.

Thanks
Eldon

At 02:53 pm 4/1/2003 -0800, you wrote:
>Eldon,
>
>What are the contents of your user file? Try this:
>
>mysql> select user, host, password from user;
>
>-ms
>
>
>-----Original Message-----
>From: Eldon Ziegler [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, April 01, 2003 2:14 PM
>To: Michael Shulman
>Subject: RE: password not working from command line
>
>I'm still getting "Access denied for user: '@localhost' to database 'mysql'
>when I enter mysql --user=testit mysql on the Linux command line. This time
>I'm trying without a password. Previously I had entered the command GRANT
>ALL ON *.* TO testit. It looks like it's not picking up the user name.
>
>At 12:24 pm 4/1/2003 -0800, you wrote:
> >Or, you can use the alternate, more legible syntax:
> >
> >mysql --user=username --password=pass
> >
> >-ms
> >
> >-----Original Message-----
> >From: Andy Eastham [mailto:[EMAIL PROTECTED]
> >Sent: Tuesday, April 01, 2003 10:36 AM
> >To: [EMAIL PROTECTED] Mysql. Com
> >Subject: RE: password not working from command line
> >
> >Eldon,
> >
> >Make sure you don't enter a space between -u and the username and -p and
>the
> >password
> >
> >ie mysql -uuser -ppassword
> >
> >Andy
> >
> > > -----Original Message-----
> > > From: Eldon Ziegler [mailto:[EMAIL PROTECTED]
> > > Sent: 01 April 2003 16:15
> > > To: [EMAIL PROTECTED]
> > > Subject: password not working from command line
> > >
> > >
> > > The password I entered in a GRANT statement isn't being accepted from
>the
> > > command line after entering mysql -u username -p and then entering the
> > > password from the GRANT statement. Is there something else I need to
do?
> > >
> > >
> > > --
> > > MySQL General Mailing List
> > > For list archives: http://lists.mysql.com/mysql
> > > To unsubscribe:
> > > http://lists.mysql.com/[EMAIL PROTECTED]
> > >
> > >
> >
> >
> >
> >--
> >MySQL General Mailing List
> >For list archives: http://lists.mysql.com/mysql
> >To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
> >
> >
> >
> >--
> >MySQL General Mailing List
> >For list archives: http://lists.mysql.com/mysql
> >To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
>
>Eldon Ziegler
>President
>ProAtion Systems, Inc.
>www.proation.com

Eldon Ziegler
President
ProAtion Systems, Inc.
www.proation.com


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

Reply via email to