T
T
theEternalStudent2016-10-12 17:40:16
PostgreSQL
theEternalStudent, 2016-10-12 17:40:16

After migrating a project to laravel from apache to nginx database (pgsql) gives an error SQLSTATE[08006] [7] could not connect to server, how can I solve this?

After migrating a project to laravel from apache to nginx, the database gives an error:
PDOException in Connector.php line 55:
SQLSTATE[08006] [7] could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?
how can this be solved?
DB: postgresql
OS: ubuntu 14.04

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
D', 2016-10-12
@theEternalStudent

What does apache/nginx have to do with it?
It cannot connect to the database. You need to see if postgre is running at all.

A
Andrey Korytov, 2016-10-13
@AKorytov

As far as I remember, during the initial setup of PGSql, you need to edit the interfaces and IP addresses from which it listens in the config

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question