Bruce Martin wrote:
When I log in as root using:
mysql -u root -p mysql
I get the mysql prompt:
mysql>

I then issue this command or statement:

mysql>GRANT ALL PRIVILEGES ON *.* TO 'testUser'@'' IDENTIFIED BY 'some_password' WITH GRANT OPTION;

First, your hostname is blank. That won't work. You need to either specify a hostname, or use the wildcard character, '%'. See the manual for details <http://dev.mysql.com/doc/refman/5.0/en/connection-access.html>.

Second, why are you making testuser equivalent to root? Don't give a user any more privileges than necessary. For a test user, I'd suggest starting with just

  GRANT ALL PRIVILEGES ON test.* TO 'testUser'@'localhost'
  IDENTIFIED BY 'some_password';

I get the following returned:

Query OK, 0 rows affected (0.00 sec)

Why is this not working?

What makes you think it didn't work? You didn't get an error message. Instead, you got "Query OK". Looks like it worked, to me.

To test it further I try to log in as testUser but it tells me access denied for user [EMAIL PROTECTED]

That's not the whole error message. Please show us your exact comand, and copy/paste the exact error message. We could try to guess what's wrong (probably there is no [EMAIL PROTECTED]), but it's better not to guess.

Even if I grant the testUser @ localhost.

No spaces. Again, show us the exact GRANT command, the exact connection command, and the exact error message.

I can look in the user table and sure enough user [EMAIL PROTECTED] is there.

Better yet, you can verify a user's privileges with the SHOW GRANTS command:

  SHOW GRANTS FOR [EMAIL PROTECTED];

Bruce Martin
The Martin Solution
PO Box 644
Delaware Water Gap, PA
(570) 421-0670
[EMAIL PROTECTED]

Michael

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

Reply via email to