djangodatabase-connectionpgadmin

Unable to connect to server: PgAdmin 4


I have installed pgadmin on a new windows laptop and when I try to create a new server, it says:

enter image description here

When I try to run my django app in pycharm it is giving me the same error

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?

How to solve this ?


Solution

  • You can configurate your newly created server to run on localhost and port 5432.

    First select the “Connection” tab in the “Create-Server” window. Then, configure the connection as follows:

    NOTE You first have to install PostgreSQL on your machine and run it or run it with docker.