Home > Just the Video Tutorials, WP database > “Error Establishing a Database Connection” — How to Fix This WordPress Error

“Error Establishing a Database Connection” — How to Fix This WordPress Error

“Error Establishing a Database Connection” — How to Fix This WordPress Error: Part 1 of 2

“Error Establishing a Database Connection” — How to Fix This WordPress Error: Part 2 of 2

Related posts:

  1. How to Import a Large WordPress Database — An Alternative to phpMyAdmin Tweet IMPORTANT MESSAGE: If you use the Bigdump script I...

  1. September 29th, 2010 at 00:37 | #1

    No Worries…Got it now…sadly just started from scratch, then of course found my simple mistakes css feeds weren’t in right place…..

    However, want to give you kudos again for your excellent teaching and communicating style….good for us non-techies….I’ll be back to check on your wisdom!

    At least here you gave me a good jumping off point for commonsense troubleshooting..lessons learned!

    Thanks Again!

    The Maven

  2. December 8th, 2010 at 22:35 | #2

    Life Saver..thank you

  3. Mohit
    December 17th, 2010 at 09:05 | #3

    Great Video, its help me to remove the error
    Thanks

  4. christine
    December 19th, 2010 at 17:47 | #4

    you’re a godsend. ;) Thanks, it worked perfectly.

  5. January 2nd, 2011 at 02:53 | #5

    hi; i am having this problem but it is transient; some times it just takes time to load but other times the site just wont load. config file is fine

  6. January 2nd, 2011 at 10:37 | #6

    @saurabh: That is a server problem losing connection to the db, not a setting problem…you will need to contact your host about that.

  7. January 3rd, 2011 at 01:55 | #7

    I really appreciate. It helped me !
    I was moving my blog to new host !

  8. January 14th, 2011 at 17:07 | #8

    thanks for the videos. I checked everything and the config file is fine with all the right information. I am no longer getting a database connection error, just a blank screeen. Hosted at Godaddy. Can you help
    thx
    craig

  9. January 30th, 2011 at 22:26 | #9

    Thanks a million! I fixed it. Just to add for anybody else: I had to assign a password when I used phpMyadmin and that changed the database password.

    Nice tag cloud. ;)

  10. nik
    February 1st, 2011 at 03:25 | #10

    Thank you, big help…I just needed to create a new username with all privileges. Strangely the first one created did not have all privileges.

  11. saqib
    February 3rd, 2011 at 01:59 | #11

    i am in very tension for 1 day that how to solve this problem but u really help me..thanx

  12. February 5th, 2011 at 11:32 | #12

    Big Thank you , this fixed a very annoying problem as I’d overwrite the wp-config.php file.

  13. Nic
    February 16th, 2011 at 18:22 | #13

    Awesome!!! Thanks

  14. March 28th, 2011 at 02:57 | #14

    HUGE THANKS. Been struggling with this error message on my boyfriend’s blog. Come to find out something much worse had happened with his blog. All of his .php files were wiped out somehow. But I wouldn’t have noticed that if it hadn’t been for your vids showing to check them. Now I just have to figure out how to get his .php files back. Or somehow recreate them.

  15. David
    May 18th, 2011 at 01:38 | #15

    very informative, my site sometime shows ‘error database connection’, but it will automatically go back to normal after few second, do you know what caused the problem? is it because of server heavy load? or something related to hosting configuration? i am using wp 3.1.1

  16. May 18th, 2011 at 06:20 | #16

    @David: Yes, if it’s intermittent then it’s not a WP config issue, it’s a server connection issue…for some reason it’s losing the connection to mysql–most likely a load issue.

  17. June 11th, 2011 at 02:11 | #17

    I have two WP installs on my POWWEB server in different directories with two different databases. Today both started giving the ‘Error establishing a database connection’ message. I checked the DB names etc. and they are all fine for both sites. Does this indicate a DB problem? I can log in and view the DB tables online in POWWEB’s control panel. I sent a request to POWWEB but I’m guessing that they won’t be much help.

    I just want to rule out that it could be the WP installs before I mess with anything. Please let me know what you think.

  18. James
    June 15th, 2011 at 05:13 | #18

    Helped me!

  19. June 16th, 2011 at 23:06 | #19

    Saved my life also! Thanks. Needed to change this because of a malware injection!

  20. Anjana
    June 23rd, 2011 at 02:57 | #20

    Big thanks!

  21. zacsmith
    June 29th, 2011 at 18:51 | #21

    I had a WP site that wasn’t coming up at all, and I had lost the documentation on the user password. Created a new user per the video, plugged it all into wp-config.php, and I was able to get my commerce site back up and selling!

    Thanks!

    zac

  22. June 30th, 2011 at 21:39 | #22

    Thank you for this post. I purchased a web site and attempted to transfer it to my host myself. This was the error I got. Sure enough the name, user, and password were all configured under the builder’s name. Adding a new user with my own settings fixed the problem. Thank you!

  23. July 11th, 2011 at 13:58 | #23

    Thank you so much! Your video was very informative and got right to the root of fixing my site after an update!
    Really appreciate it.
    Andy

  24. July 11th, 2011 at 18:15 | #24

    Hi i have tried doing all the things on the video but i keep getting the message
    Error Establishing a Database Connection??

    i really dont know what to do can any one help?

    thanks

  25. July 17th, 2011 at 11:22 | #25

    thank you the problem is solved thank you againe

  26. August 8th, 2011 at 23:56 | #26

    What a great post! You’re an excellent teacher and solved all my problems with this tutuorial. Thanks so much. I’m just stumped as to why it happened in the first place; I’m thinking it may have something to do with updating WO from simple scripts inside my host instead of from within wordpress? Will stick to the latter from now on if that’s the case…

  27. September 6th, 2011 at 02:44 | #27

    Just a quick note about the wordpress multi-site feature (I recently ran into an error but managed to fix it).

    You will need to edit all instances of the MySQL tables:
    wp_blogs (Browse > domain) for each site
    wp_options (Browse > siteurl) plus wp_1_options, wp_2_options (depending on how many sites you have, this may be be more).

    To troubleshoot, you can also go to and get a bit of debug info.

  28. September 6th, 2011 at 20:14 | #28

    I am having this very problem. I migrated my sites to a new host and lost the database connection on several sites. I have tried setting up new user and now I don’t even get the error message just a blank page. I have checked new installations of wordpress on this host and localhost is correct. At the end of the second video you mention tables. How do I work on this as a possible issue?

    I am totally baffled and really hoping not to rebuild the sites.

    Thanks!

  29. September 8th, 2011 at 15:45 | #29

    Hello all,
    If you have been locked out of your cpanel is there any way to get access to it?
    I want to reinstall wordpress but can’t get into cpanel. I have tried it through my host and can’t get in that way eater.

    Thanks. Kerry

  30. September 12th, 2011 at 09:18 | #30

    No..need to contact your host to get access to Cpanel.

  31. Ilir
    September 25th, 2011 at 04:14 | #31

    Didn’t work for me :(
    Damn i begin to hate GoDaddy

  32. October 19th, 2011 at 23:36 | #32

    Thank you! This was so helpful!

  33. November 16th, 2011 at 22:01 | #33

    Hi, I have same problem.. I changed my username in my godaddy host server then when I check my website this error appeared ‘ Error establishing a database connection;’ PLS help.. I feel no way to go..

  34. November 18th, 2011 at 11:21 | #34

    Thanks a lot it saves my life your post was very usefull

  35. sam
    December 12th, 2011 at 08:45 | #35

    Thanks a million – been banging my head all day to sort out this message and fixed it in 30 secs after seeing your vid.

  36. December 24th, 2011 at 05:43 | #36

    Thank you! Thank you!

  37. Anand
    December 25th, 2011 at 22:03 | #37

    Figaro, you should be awarded the noble peace prize. It brought me the world of peace after a night of higly tense solution searching.
    Somehow the password for the username changed (most probably). I tried the solution no.3 – created a new username and password; It just worked.
    Now for searching how that got reset by itself. I had not touched a thing on my blog for weeks – just upgraded to wordpress 3.3; if that is a reason.
    A 2009 solution works in the christmas of 2011. Merry Christmas!
    Thank you, thank you.

  38. Eusof
    January 2nd, 2012 at 04:56 | #38

    Thanks so much for the video. It helps non techies like me alot. My problem is I ve done all the cahnges but somehow all I get is a blank screen.

  39. January 17th, 2012 at 16:34 | #39

    I’m getting the same thing. I just moved my blog to a new host. Did you ever figure it out?@Craig White

  40. Richard
    January 28th, 2012 at 00:25 | #40

    I was struggling with the answer but your info saved me after 2 days trying to fix it…moved form one server to another server and never realized the DB were wrong.

Comment pages
1 2 3 148
  1. June 29th, 2009 at 05:53 | #1
  2. January 21st, 2011 at 14:59 | #2
*