To take it one step firther
I do
mysql>use database
This way all the consequent commands are directed at the specified DB
Regards,
Martin
----- Original Message -----
From: "Murad Nayal" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, August 13, 2003 5:44 PM
Subject: Re: Cant login as a user I thought I created


>
> see below:
>
> Mark Healey wrote:
> >
> > 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)
>
> the user mark has permissions to access only the marksstuff database.
> but you're not specifying the database with the mysql command.
> presumably, mysql is trying to log you in to another, default database
> that mark does not have permissions to access.
> have you tried simply:
>
> mysql -u mark -p marksstuff (and then enter the password when prompted)
>
> Murad Nayal
>
> --
> 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]

Reply via email to