On Thu, 14 Aug 2003 00:49:52 +0100, Matthew McNicol wrote:

>
>It's not enough to just specify the user name in the grant statement. You
>need to specify the host or '%' for any host (section 4.3.1 GRANT and REVOKE
>Syntax in the manual).
>
>Try...
>mysql> grant all on marksstuff.* to 'mark'@'localhost' identified by
>'password';
>mysql> flush privileges;
>
>Then to login as that user...
>> mysql --user=mark --password=password marksstuff
>
>If you still get an error logging in, login as root using the '-E' option so
>the output from queries is printed vertically (more readable) then do a
>select * from table user where user = mark. This will help us find the
>answer.

Here's the output.  I just don't get it.

I gotta tell you.  Both books I'm using are terrible.  The O'reilly
tells you to immediately do things that aren't explained until half
way through the book and the Sams gives entries that just don't work.

mysql> select * from user where user='mark';
*************************** 1. row ***************************
           Host: %
           User: mark
       Password: [I deleted this]
    Select_priv: N
    Insert_priv: N
    Update_priv: N
    Delete_priv: N
    Create_priv: N
      Drop_priv: N
    Reload_priv: N
  Shutdown_priv: N
   Process_priv: N
      File_priv: N
     Grant_priv: N
References_priv: N
     Index_priv: N
     Alter_priv: N
*************************** 2. row ***************************
           Host: blossom
           User: mark
       Password: [I deleted this]
    Select_priv: N
    Insert_priv: N
    Update_priv: N
    Delete_priv: N
    Create_priv: N
      Drop_priv: N
    Reload_priv: N
  Shutdown_priv: N
   Process_priv: N
      File_priv: N
     Grant_priv: N
References_priv: N
     Index_priv: N
     Alter_priv: N
*************************** 3. row ***************************
           Host: localhost
           User: mark
       Password: [I deleted this]
    Select_priv: N
    Insert_priv: N
    Update_priv: N
    Delete_priv: N
    Create_priv: N
      Drop_priv: N
    Reload_priv: N
  Shutdown_priv: N
   Process_priv: N
      File_priv: N
     Grant_priv: N
References_priv: N
     Index_priv: N
     Alter_priv: N
>
>
>
>----- Original Message -----
>From: "Mark Healey" <[EMAIL PROTECTED]>
>To: "Jeff Weeks" <[EMAIL PROTECTED]>
>Cc: <[EMAIL PROTECTED]>
>Sent: Wednesday, August 13, 2003 11:23 PM
>Subject: Re: Cant login as a user I thought I created
>
>
>> On Wed, 13 Aug 2003 15:50:02 -0700, Jeff Weeks wrote:
>>
>> >How did you create user mark?
>>
>> I figured the grant statement would take care of that.  That's what
>> the books I bought imply anyway.
>>
>> >BTW, after issuing a grant you must issue "flush privileges".
>>
>> Did that, the problem still persists.
>> >
>> >Check out mark in the user table in the mysql database.  There's your
>> >problem!
>>
>> What am I supposed to look for in the user table?  There is a user
>> "mark" with a password but all the permissions are N.
>> >
>> >On Wednesday, August 13, 2003, at 12:24 PM, Mark Healey wrote:
>> >
>> >> I'm trying to learn to use mysql.  I don't want to mess with the
>> >> system databases so I decided create a database and user to play
>> >> with but I can't seem to do it right.
>> >>
>> >> I logged in as root and created a database
>> >>
>> >> mysql> create database marksstuff;
>> >> Query OK, 1 row affected (0.00 sec)
>> >>
>> >> I then granted priveleges to mark
>> >>
>> >> mysql> grant all on marksstuff.* to mark identified by 'password'; not
>> >> the real password
>> >> Query OK, 0 rows affected (0.01 sec)
>> >>
>> >> I then logged out and tried to login as mark
>> >>
>> >> [EMAIL PROTECTED] mark]$ mysql -u mark -ppassword
>> >> ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password:
>> >> YES)
>> >>
>> >> What am I doing wrong?
>> >>
>> >>
>> >>
>> >> Mark Healey
>> >> [EMAIL PROTECTED]
>> >>
>> >> This account is only for lists to which I've subscribed.
>> >> Any spammers invite the worst revenge I think I can get away with.
>> >>
>> >>
>> >> --
>> >> MySQL General Mailing List
>> >> For list archives: http://lists.mysql.com/mysql
>> >> To unsubscribe:
>> >> http://lists.mysql.com/[EMAIL PROTECTED]
>> >>
>>
>>
>> Mark Healey
>> [EMAIL PROTECTED]
>>
>> This account is only for lists to which I've subscribed.
>> Any spammers invite the worst revenge I think I can get away with.
>>
>>
>> --
>> MySQL General Mailing List
>> For list archives: http://lists.mysql.com/mysql
>> To unsubscribe:
>http://lists.mysql.com/[EMAIL PROTECTED]
>>
>>
>
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.507 / Virus Database: 304 - Release Date: 05/08/2003



Mark Healey
[EMAIL PROTECTED]

This account is only for lists to which I've subscribed.
Any spammers invite the worst revenge I think I can get away with.


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

Reply via email to