Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, I am setting up a database f

Status
Not open for further replies.

sucram

Programmer
May 23, 2001
75
GB
Hi,

I am setting up a database for the first time.
I am trying to create new users on the database. This is what I am currently doing.

> mysql --user=root mysql -p
mysql> connect datab
mysql> GRANT ALL PRIVILEGES ON datab TO user@localhost IDENTIFIED BY 'pass';

This is what is returned:
Query OK, 0 rows affected (0.00 sec)

When I try to enter the database as user it does not allow me enter.

Any help would be much appreciated.
Thanks,
Marcus


 
Hi,

Try :
GRANT ALL PRIVILEGES ON datab.* TO user@localhost IDENTIFIED BY 'pass';
Also, if you are connecting from a client to the db,then you also need to do :
GRANT ALL PRIVILEGES ON datab.* TO user@'%' IDENTIFIED BY 'pass';

Also, I don't think you need the "connect datab" line before the GRANT.
That should work, at least, it does for me!!

Mark.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top