I'm setting up a wordpress site through heroku. I get the following error at this url: http://aaaa.herokuapp.com/wp-admin/
Can't select database:
We were able to connect to the database server (which means your username and password is okay) but not able to select the heroku_ddddddd database.
Are you sure it exists? Does the user user_nnnnnnn have permission to use the heroku_ddddddd database?
On some systems the name of your database is prefixed with your username, so it would be like username_heroku_ddddddd. Could that be the problem?
In my wp-config.php file, I have this database connection code:
if (isset($_SERVER["DATABASE_URL"])) {
$db = parse_url($_SERVER["DATABASE_URL"]);
define("DB_NAME", "heroku_ddddddd");
define("DB_USER", "user_nnnnnnn");
define("DB_PASSWORD", "pass_ppppp");
define("DB_HOST", "us-cdbr-east-04.cleardb.com");
}
else {
die("Your heroku DATABASE_URL does not appear to be correctly specified.");
}
I can login to the database using mysql from the command line, mysql --user=user_nnnnnnn --password=pass_ppppp --host=us-cdbr-east-04.cleardb.com --database=heroku_ddddddd