Web Hosting Forum | Lunarpages

Author Topic: Error establishing a database connection  (Read 3311 times)

Offline SiddD3rs

  • Spacescooter Operator
  • *****
  • Posts: 34
Error establishing a database connection
« on: March 31, 2016, 09:17:43 AM »
on all three WP sites hosted on my webspace on the MIKULA server....

http://nampaichuanlondon.com/members
http://matthewlai.co.uk/blog
http://suzieandlee.co.uk/

This is the message I get when trying to log on to wp-admin on all the abovementioned sites:

Quote
Error establishing a database connection

This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at localhost. This could mean your host's database server is down.

    Are you sure you have the correct username and password?
    Are you sure that you have typed the correct hostname?
    Are you sure that the database server is running?

If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

I checked the users and passwords and all is correct, but not sure whether you've changed the DB_HOST from "localhost" to something different.
  :-?

I can access the databases fine from PHP Myadmin. 

Please help!  :?  :whip:
« Last Edit: March 31, 2016, 09:25:23 AM by SiddD3rs »

Offline MrPhil

  • Senior Moderator
  • Berserker Poster
  • *****
  • Posts: 6206
Re: Error establishing a database connection
« Reply #1 on: March 31, 2016, 01:18:35 PM »
If you still have your account "welcome" email, it should tell you what to use for database location and account prefixes for database and user. If not, have you looked through your hosting account control panel (are you using LPCP or cPanel)? Failing that, open a support ticket and ask.
Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-

Offline SiddD3rs

  • Spacescooter Operator
  • *****
  • Posts: 34
Re: Error establishing a database connection
« Reply #2 on: March 31, 2016, 02:45:57 PM »
thanks for the reply MrPhil, I do have the welcome email, but there's no such info in there. Only info available is  01) base account user/passwords 02)FTP access 03) email access

My account is using CPanel!

Offline SiddD3rs

  • Spacescooter Operator
  • *****
  • Posts: 34
Re: Error establishing a database connection
« Reply #3 on: March 31, 2016, 03:35:45 PM »
OK - an update:

seems that all the passwords for the databases were changed or removed somehow?? Maybe when LP moved from the previous PHP version to 5.6?

I went through the "wp-config.php" files for each installation, noting the Database name, user and password that was in there then went on CPanel's "MySQL Databases" and input the correct passwords in the corresponding Database users.

All seems to be working correctly now.

Also discovered that one of the blogs had two extra unsolicited users (of the .ru category!), who I deleted from within PHPMyAdmin.  :hypno: :o

 :yep:

we can mark this solved

Offline MichaelT

  • Support
  • Jabba the Hutt
  • *****
  • Posts: 579
Re: Error establishing a database connection
« Reply #4 on: April 01, 2016, 01:28:40 AM »
That would likely have been caused by the upgrade to MySQL 5.6. You should have gotten a warning email about the upgrade but the MILULA server upgrade information would also be posted on the forums in this thread ->  "Apache/PHP/MySQL upgrade scheduled on shared server - 8-11 Feb 2016 1AM PST"

 

Share |