Answer the question
In order to leave comments, you need to log in
Why does it give a "Connection refused" error?
Uploaded the site to the host. DB too. gives such an error
Database Exception – yii\db\Exception
SQLSTATE[HY000] [2002] Connection refused
↵
Caused by: PDOException
SQLSTATE[HY000] [2002] Connection refused
Answer the question
In order to leave comments, you need to log in
Settings must be stored in common/config/main-local.php
for Advanced
template and in config/main-local.php
for Basic
template.
If you are connecting to a remote host, then you need to allow remote connections in the settings and open the port in the firewall.
Write how you checked the connection.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question