Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 799 Vote(s) - 3.52 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unable to connect to server: PgAdmin 4

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

[![enter image description here][1]][1]


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 ?

[1]:
Reply

#2
I had the same issue. But in my case I had installed pgadmin in version 9. But also installed version 12 at the same time.

When I now uninstalled version 9, the port was already set in the config of version 12 and not given free.

So my solution was to change the port of version 12 in the `postgresql.conf` file. Or even simplier, change the port in the server creation from **5432** to **5433**. Now you are able to create a server again.
Reply

#3
I was trying to install PostgreSQL and pgAdmin with an installer that is given here

[To see links please register here]

. This installer includes the PostgreSQL server, pgAdmin;
I was facing an error while starting pgAdmin: "The pgAdmin 4 server could not be contacted". I tried different solutions but did not work.

Then I uninstalled both of them, deleted the temp folder `C:\Users\%USERNAME%\AppData\Roaming\pgAdmin` and delete those ones too `%temp%`.

Then I installed the pgAdmin separately from this link

[To see links please register here]

and it works. If you need to connect it with your local server I think you should install the PostgreSQL server first and then pgAdmin separately.
Reply

#4
You should uninstall Postgres and pgAdmin from your PC. Then install postgres, note that you have the option of installing pgAdmin together with Postgres, so you don't have to download pgAdmin separately. Allow the installation to complete then restart you PC. Hopefully you should be able to create your server/database
Reply

#5
I faced the same problem. So I uninstalled pgAdmin through control panel. after that deleted the folder where pgAdmin was located. Then I went to [this link][1] and installed pgadmin whole package from there and now it works fine.


[1]:

[To see links please register here]

Reply

#6
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:

- Enter your server’s IP address in the “Hostname/ Address” field. Default is localhost.

- Specify the “Port” as “5432”.


- Enter the name of the database in the “Database Maintenance” field.

- Enter your username as postgres and password (use the same password you used when previously configuring the server to accept remote connections) for the database.


- Click “Save” to apply the configuration.


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

#7
I was getting this error when I was running pgadmin in a docker container on my machine, which meant that localhost:5432 was not accessible.

I worked around this by using the native version of pgadmin.
Reply

#8
After two years i think this would be of good help to so many people.

You don't have to uninstall postgresql or PGADMIN from your system.

What you need to do i input the username and password for a particular user created on postgresql into the server input box.

And that all you need.

i hope this helps anyone
Reply

#9
In case someone is running the pgadmin-4 in docker, and not able to connect to postgres container, like me.
The solution is to first find the ip at which the docker image is running.

Step-1, make sure the postgres container is running.

Step-2 write command- PS C:\docker> docker ps
Should result as below or similar,

[![enter image description here][1]][1]

Step3- in order to find the ip address running the postgres use part of container ID and analyze like below command

PS C:\docker> docker inspect fc834
[![enter image description here][2]][2]
Note: Here I have only used part of container id that is fc834..

This should result the following or similar,
Step4-

Use this ip address in the connection as below with your correct username and password


[![enter image description here][4]][4]
[![enter image description here][3]][3]

[1]:

[2]:

[3]:

[4]:
Reply

#10
If you are running PostgreSQL in a docker container, set the host name in pgAdmin to `postgres` not the mapped address or localhost.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through