QUOTE
Could not select the database: Access denied for user: 'mydbusername' to database 'mydatabasename'
(The actual message, of course, contains my actual database user name and database name.)
Here is the code I'm using. The values I enter in each of the variables exactly matches the values that appear in phpMyAdmin for my database. The code below has "dummy" values, except for the value 'localhost', which is what is actually in my code.
CODE
DEFINE ('DB_USER', 'mydbusername);
DEFINE ('DB_PASSWORD', 'mypassword');
DEFINE ('DB_HOST', 'localhost');
DEFINE ('DB_NAME', 'mydatabasename');
// Make the connnection and then select the database.
$dbc = @mysql_connect (DB_HOST, DB_USER, DB_PASSWORD) OR die ('Could not connect to MySQL: ' . mysql_error() );
mysql_select_db (DB_NAME) OR die ('Could not select the database: ' . mysql_error() );
...what am I missing, that keeps me from being able to get to my database?