"Error establishing a database connection" (NOTHING HELPS)

I keep getting this error randomly. I’ve changed wp-config, messed with plugins, spent hours researching how I can fix it, but alas, the error follows me. Sometimes I will get just the title, or other times I will get this.:

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 sql311.epizy.com. This could mean your host’s database server is down.

  • Are you sure you have the correct username and password?
  • Are you sure you have typed the correct hostname?
  • Are you sure 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.

Please help in any way that you can. Yes, I have read Common MySQL Connection Errors - InfinityFree Knowledge Base haha.

-j

Try turning on WP_DEBUG and show me a screenshot.

How do I do that?

5 Likes

Ok, here you go.

Text:

Warning : mysqli_real_connect(): (HY000/2002): Connection timed out in /home/vol18_2/epizy.com/epiz_28850200/htdocs/wp-includes/wp-db.php on line 1653

Deprecated : mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/vol18_2/epizy.com/epiz_28850200/htdocs/wp-includes/wp-db.php on line 1685

Warning : mysql_connect(): Connection timed out in /home/vol18_2/epizy.com/epiz_28850200/htdocs/wp-includes/wp-db.php on line 1685

Connection timed out

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 sql311.epizy.com. This could mean your host’s database server is down.

  • Are you sure you have the correct username and password?
  • Are you sure you have typed the correct hostname?
  • Are you sure 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.

It sounds like some others are having DB issues at this time. Please be patient white we wait for a fix.
Thanks

You can use this site to host your WordPress database temporary before they fix it: https://freesqldatabase.com/

Is there a way I can move my DB to that website? Thanks for your reply!

Just signup, create a new database. Go to the phpmyadmin in vPanel and do export. Then go to that website’s phpmyadmin and import it. Then go to wp-config.php and change the database, database user and password to the one on that website.

Now it says this:
(My website has just been unsuspended)

@justinexclaim

My post was just hidden because of spam? What did I do? Sorry if this is not relating to you but why would it get hidden for spam??

That wasn’t me, but I can see why. Before posting, you should always looks for resent related topic, like the one I posed above. By not doing so, and by creating a new topic that is super similar, it is considered spam because you should have posed on the other related topic. As for the other post, someone probably flagged it because it was a partial duplicate of the first post (Honestly, I think that while the first post should have been flagged, the second one was fine. Because I am not a Moderator/Admin, I cannot remove the flag on the second post)
Good question though!

but my problem was different? Yes similar but it had a different outcome.

and I can’t even access my database

Infinityfree is having errors with databases
I get errors on my website, but I can reload a few times to fix it
infinityfree shuts down my website because it’s using too many resources
after 24 hours it’s unsuspended and MY SITE IS NOT WORKING AT ALL

We know this, you know this, complaining is going to get you nowhare.

That may have something to do with the fact that you are constantly reloading it. The files on your site could also be quite large, or at least require a lot of server power.

I know you are frustrated; this is frustrating. But you never followed the topic template in the beginning, and you never provided a domain, so we can’t look into your site more.

If you want you site working now, and you want your site to stop getting suspended, just upgrade to premium, where you will also get 1-on-1 support for all future issues.

Ok, but why is my website completely not working after getting unsuspended?
(EDIT: I just refreshed and it seems to be working now. This is so confusing to me.)

Maybe the DB error got fixed? I know just as much as you do.

It kind of is for me too. iFastNet never tells us of new outages, and Admin has stopped posting.

1 Like

I would upgrade to ifastnet but honestly im just a student trying to make a cool website for his friends, I’m planning on getting a summer job but any money spent on this is money taken away from a car :confused:

If your website doesn’t require people to create an account or sells products, then you really don’t need to use WordPress. Try something like Mobirise or Publii (loads faster, simple to use, and is more secure because it doesn’t require databases) and let me know the outcome (I recommend Publii since it is more similar to WordPress(what you are used to).