AlexandreTELOUK
AlexandreTELOUK

Reputation: 19

SQLSTATE[08006] [7] could not connect to server postgresql

i'm working on a project where i have to put a website on a server and i'm encountering this error :

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?

So i already checked online, i did : ufw allow 5432/tcp (to allow port 5432 to be listen)

In the postgresql.conf, i changed listen_adresses='localhost' to listen_addresses='*' In the pg_hba.conf, i put host all all 0.0.0.0 md5

And i still got the error, if anyone can help me it would be great !

If it helps, the error appeared after i updated my postgres, and after i uncommented pdo_pgsql. I then restarted my database, then the error occured.

Upvotes: 1

Views: 657

Answers (0)

Related Questions