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?

已提问 2 年前1805 查看次数
1 回答
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
已回答 2 年前
profile picture
专家
已审核 1 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则