Hi

I am hoping someone can please help. I have just instaled Drupal 7 for the first time and I am receiving an error to the effect that it cannot connect to the database. Here are the directions I have followed so far.

1. Installed Drupal as part of a sub-domain while I configure and test the site, www.test.mydomain.com
2. Created a database, a user for the database and a password for the user.
3. Ran a database check tool from within my domain provider's control panel to check the database is functioning, and it is.
The username and database names are prefixed with the name of the user I am logged in with. I have entered the prefix and the database/user names into the correct fields, such as UserPrefix_DatabaseName. Obviously I have enered the password as well.
4. Clicked Advanced and saw that localhost is selected.
5. Clicked submit and I receive this error.

In order for Drupal to work, and to continue with the installation process, you must resolve all issues reported below. For more help with configuring your database server, see the installation handbook. If you are unsure what any of this means you should probably contact your hosting provider.

Failed to connect to your database server. The server reports the following message: SQLSTATE[42000] [1044] Access denied for user 'UserPrefix_UserName'@'localhost' to database 'UserPrefix_DatabaseName'.

I have contacted my domain provider who is trying to investigate the problem, but I wonder if anyone had any thoughts of things I could please try?

Thanks so much.

Comments

LarsKramer’s picture

Check again both username and password for the database that they are the same as you specified in the control panel. Maybe try something simple to rule out any typing errors. Also remember in your host's control panel to give that user all necessary priviliges to the database you created.

If it still fails, while you wait for an answer from your host, try setting up a local server on your computer:
http://drupal.org/node/307956

tjcandy’s picture

I also had the same problem with the database but i found that the issue was a small thing that was overlooked. The username and password i entered were correct but i forgot to assign all privileges to the user and also didnt add the user to the database. After fixing that i was back in business.

jsimonis’s picture

I was thinking the same thing. When I've had this happen - and the username, database name, and password are correct - it has been for one of two reasons:

I didn't assign all the permissions to the user for that database
I didn't assign the user to the database (I created the db and I created the user, but I did not link them together)

lorraine02’s picture

I have only suggestion to you : just try again.
and I always meet these problem , such as I can't see my reply and my content body and so on.
wish you a good luck!