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!

Creating new user - beginner

Status
Not open for further replies.

frosty7700

Programmer
Aug 10, 2001
95
US
I am having a problem logging into a DB with a newly-created user. I have verified that I am indeed entering the right password, so that does not appear to be the issue. Below is the screen output from DB creation through my attempt to login:

[Serv1:/usr/bin] admin% mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3252 to server version: 3.23.53-entropy.ch

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create database testdb;
Query OK, 1 row affected (0.00 sec)

mysql> grant select,insert,update,delete,index,alter,create,drop
-> on testdb.*
-> to testuser identified by 'test2003';
Query OK, 0 rows affected (0.00 sec)

mysql> quit
Bye
[Serv1:/usr/bin] admin% mysql -D testdb -u testuser -p
Enter password:
ERROR 1045: Access denied for user: 'testuser@localhost' (Using password: YES)
 
One thing I noticed was in the User table the Host for the user is listed as "%". I know it's likely something dumb but for the life of me I can't find anything discussing this problem (the fact that the Keyword Search on Tek-Tips is broken doesn't help).
 
"%" is MySQL's host wildcard. It is discussed in the page that describes the grant statement:
Unfortunately, I can't duplicate your error. Have you tried issuing "FLUSH PRIVILEGES" or restarting the server? Want the best answers? Ask the best questions: TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top