AWS Lightsail Error Message saying “Error establishing a database connection"

0

Hello, there. We are currently facing an issue on using AWS Light with Wordpress. The error message shown on website was “Error establishing a database connection". This appears whenever we launch any instances. The first time we found the error, we were using Wordpress side for putting some e-commerce plugins and heard a developer doesn’t think he touched any database connections.

As we cannot figure out the problem by ourselves, we would like to know the reason why this occurs. Till now we don't know how to solve this so the developer just snapshoted the previous instance and made new one to revive the website. Even though we restart the new instance, we got errors which I indicated above.

Thanks in advance.

  • This appears like a configuration issue? But before diving deeper; Do you mean that the Website was working well before the issue occurred?

gefragt vor 2 Jahren1804 Aufrufe
1 Antwort
0

Hello,

Sorry to see you're encountering this issue. This error likely means either the username/password combination for Wordpress connecting to the database set in wp-config.php is incorrect, or the database isn't running. Here are a few things I'd try:

  1. See if the database is running. You can use the command ps aux | grep mysql to see if there's a mysql process running.
  2. Check your wp-config.php file to ensure that the database credentials set there are correct.
  3. Check the instance's disk space (df -h) to ensure it's not full.

I hope those steps help you figure out the issue. Thank you for using Amazon Lightsail!

-Maxwell

Maxwell
beantwortet vor 2 Jahren
profile picture
EXPERTE
überprüft vor einem Monat

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen