1

I have just loaded my drupal 7.32 site to JustHost from my pc (running xampp) copied the files across, and exported and imported the database to JustHost cpanel, i browse onto the website and I get the error message below. I have triple checked my database name and username of the database and password and they are correctly specified in my settings.php file. My database was called 'school2' on the pc, but I'm not sure that will affect anything.

I get this error message:-

PDOException: SQLSTATE[42000] [1044] Access denied for user 'caerleon_prim'@'localhost' to database 'caerleon_prim' in lock_may_be_available() (line 167 of /home4/caerleon/public_html/includes/lock.inc).

Can anyone help?

closed as off-topic by Letharion, Mołot, Krishna Mohan, Clive Nov 5 '14 at 11:03

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question was caused by a problem that can no longer be reproduced, was solved by a cache clear, or was a simple typographical error. While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers." – Letharion, Mołot, Krishna Mohan, Clive
If this question can be reworded to fit the rules in the help center, please edit the question.

  • "but I'm not sure that will affect anything." Yes, it will, you have to set database name, user and password correctly. All three are needed. Plus, some hosting companies use different "machine names" for databases, and different in panel. You need to ask them what exactly you should put as name, user and password to access your DB. – Mołot Nov 3 '14 at 8:42
-1

With JustHost you need to assign the user to the database from the Database Maintenance drop down page. Instructions are on their site too. I did this, and it fixed my problem.

Not the answer you're looking for? Browse other questions tagged or ask your own question.