psql: could not connect to server: Connection refused

In this article, we will the solution for below error.

psql: could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?

psql could not connect to server Connection refused

Solution:

Check the status of PostgreSQL server. I found that PostgreSQL server is down. I have started my PostgreSQL server, then successfully able to connect to PostgreSQL server on Windows