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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MySQL User Privileges

Status
Not open for further replies.

wendyp

IS-IT--Management
Mar 4, 2003
51
US
My web host is running:
MySQL version 3.23
PHP version 4.3.2

I feel like an idiot, but I can't get a straight answer from their help center. I want to create a user with only select rights on a database. Here is the syntax I am using:

GRANT SELECT ON putlerda_FirstImp.* TO putlerda_guest@localhost;

This (and many variations of it) come back with the following error:
MySQL said:

Access denied for user: 'putlerda@localhost' to database 'putlerda_FirstImp'

It seems to take off the _guest from the user name. I've tried variations - just putting in guest, just putting in putlerda, etc.

Am I overlooking something totally obvious?

/Wendy

 
underscore _ is a wildcard to mysql, you will need to single quote ( ' ) the username to avoid this.


______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
Thanks for the idea. I tried it 2 ways:

TO 'putlerda_guest'@localhost
TO 'putlerda_guest@localhost'

And I still get the following error message. I have added the user guest to the database from the MySQL control panel. Then I went into PHPMyAdmin (which has no menu choice for user privileges) and used an SQL query window.

Database putlerda_FirstImp running on localhost

Error

SQL-query :

GRANT SELECT ON putlerda_FirstImp. * TO 'putlerda_guest'@localhost

MySQL said:

Access denied for user: 'putlerda@localhost' to database 'putlerda_FirstImp'

Back
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top