N
N
nnkrasovok2019-07-01 01:57:35
Yii
nnkrasovok, 2019-07-01 01:57:35

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

Connections to a DB are registered correctly, checked up 100 times.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Derepko, 2019-07-01
@xEpozZ

Settings must be stored in common/config/main-local.phpfor Advancedtemplate and in config/main-local.phpfor Basictemplate.
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 question

Ask a Question

731 491 924 answers to any question