Wah!
I created the following user:
mysql> grant all on * to testuser identified by 'testuser';
Query OK, 0 rows affected
I submit this query via PHP:
$db = msql_connect("localhost", "testuser", "testuser");
mysql_select_db("mydb",$db);
- etc. -
and I get this error message:
Warning: Access denied for user 'testuser@localhost" (Using password: YES) in (location of request in document)
Warning: MySQL Connection Failed: Access denied for user 'testuser@localhost" (Using password: YES) in (location of request in document
BUT
if I change my query to
$db = msql_connect("localhost", "root", "rootpassword");
mysql_select_db("mydb",$db);
- etc. -
it works like a charm.
I was able to revoke all from testuser as well, so the user was created in the db. But I just can't get into the db with that user (or any other one I try to create/grant privileges to). Only "root" is working.
This is on a Mac G3 with OS X 10.1.5. I have a virtually identical installation of PHP, MySQL and Apache on a G4 running the same OS and it works like a charm.
What am I missing?