Error establishing a database connection

dhrubataraschool.edu.np

Error establishing a database connection

This either means that the username and password information in your wp-config.php file is incorrect or that contact with the database server at sql101.byetcluster.com:3306 could not be established. 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 are 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’ve tried updating the username and password from the MySQL Connection Details but its not working. It would be great if the community can help me fix this. Thank you.

A good place to start is to enable debug mode in WordPress. That way, you can get the actual database error message, rather than “it’s not working but we won’t tell you why”.

Once you have the error, you can check it against this article to find a possible cause:

If you still need help, please share the full error message you found with the debug mode.

5 Likes

Here’s the error code I received after enabling debugging mode.

Warning: mysqli_real_connect(): (HY000/1045): Access denied for user ‘36696884_3’@‘192.168.0.221’ (using password: YES) in /home/vol6_6/infinityfree.com/if0_36696884/htdocs/wp-includes/class-wpdb.php on line 1982

Access denied for user '36696884_3'@'192.168.0.221' (using password: YES)

This is wrong.

It was a Softaculous user and gets messed up every now and then.

Please use if0_36696884 and your hosting account password instead.

5 Likes

@Frank419 I tried changing the username to if0_36696884 and the hosting password.

The website is reachable now but its taking me through the WordPress installation screen. Does that mean all my previous data (website content and assets) has been reset or will it take me to the previous saved state?

Thank you for your help.

If you see a WordPress installation screen, that’s bad. It usually means the database you’re connecting to doesn’t have the tables WordPress looks for. If you go through the installation wizard, you’ll be left with a clean WordPress installation.

I had a look in your account and I see you have two databases, both with what seem to be just the default WordPress data, neither looks like what should be your website.

There have been some issues with the database server you’re on, sql101, but so far it was just related to permission issues, not actual data loss.

So I’m not sure what happened to your WordPress database. But I can’t find it.

4 Likes

That means I have lost all the data.

When the issue appeared, I had the htdocs folder downloaded locally. So, if the current production folder with that one, will the data get recovered.

Thank for the help. I really appreciate it.

Please note that with MySQL, your databases are stored by the database server, and are not part of your website files.

So if you only backup your website files, it will not have your database, and you will not be able to recover your website with it. And if you do have the database but don’t import it in addition to the files, you won’t be able to restore it either.

6 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.