Website Stopped working after 3 months in EC2

0

the health check is okay but when I access my website it gives me these errors:

2 exception(s): Exception #0 (Zend_Db_Adapter_Exception): SQLSTATE[HY000] [2002] Connection refused Exception #1 (PDOException): SQLSTATE[HY000] [2002] Connection refused

how can I solve this? note: it is MySQL error from a Magento build

Sultan
質問済み 1年前208ビュー
2回答
1
承認された回答

I assume you have set up the connection information to MySQL in .env. Is the correct information set up?
Make sure MySQL is running.
For example, if you are running MySQL on Linux, you can check the status with the following command.

sudo systemctl status mysql

If it is stopped, you will need to start it with the following command.

sudo systemctl start mysql
profile picture
エキスパート
回答済み 1年前
profile pictureAWS
エキスパート
レビュー済み 1年前
profile picture
エキスパート
レビュー済み 1年前
0

Hi Sultan.

Where is your MySQL instance running? Is it RDS, a separate EC2 instance, or in the same EC2 instance as your application?

Thank you.

profile pictureAWS
エキスパート
回答済み 1年前
  • it should be in the same EC2 instance as my application

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ