Add new server steps:
Open pgAdmin4
Right click in "Servers" in Browser panel
Enter some meaningful name for Server eg: "PostgreSQL9.6"
Click on "Connection" tab
Enter "Host" (default is "localhost" if database is installed on your own local system otherwise IP address of system where PostgreSQL database is installed)
Enter "Port" (default port for PostgreSQL server is "5432")
Enter "Maintenance Database" name (default is "postgres")
Enter "User Name" (default user is "postgres")
Enter "Password" (Password which you gave when you installed PostgreSQL database for "postgres" user)
Click on CheckBox "Save password?" to save your password in pgAdmin4 for future use.
Now as you can see, "Save" button gets enable in dialog, just click on it.
You will see that your server is now listed under "Servers" and you should be connected to your database.
Answer from Murtuza Z on Stack OverflowProblems connecting pgadmin4 to postgreSQL
How to connect to postgres using pgAdmin 4
can connect to database on command line and using the postgresql vs code addon, but not using pgadmin4
How to load sqlite3 db file in pgadmin4?
Videos
Add new server steps:
Open pgAdmin4
Right click in "Servers" in Browser panel
Enter some meaningful name for Server eg: "PostgreSQL9.6"
Click on "Connection" tab
Enter "Host" (default is "localhost" if database is installed on your own local system otherwise IP address of system where PostgreSQL database is installed)
Enter "Port" (default port for PostgreSQL server is "5432")
Enter "Maintenance Database" name (default is "postgres")
Enter "User Name" (default user is "postgres")
Enter "Password" (Password which you gave when you installed PostgreSQL database for "postgres" user)
Click on CheckBox "Save password?" to save your password in pgAdmin4 for future use.
Now as you can see, "Save" button gets enable in dialog, just click on it.
You will see that your server is now listed under "Servers" and you should be connected to your database.
You are getting error because You did not specified Name for server, Click on "General" tab provide name for your server like "PostgreSQL9.6"
Refer the pgAdmin4 documents:
Connecting to server: https://www.pgadmin.org/docs4/dev/connecting.html
Creating new server: https://www.pgadmin.org/docs4/dev/server_dialog.html
While creating new Server you should have all the required parameters like,
Host (default is "localhost" if database is installed on local system), Port(default is "5432"), Maintenance Database Name (default is "postgres"), User Name (default is "postgres"), Password
Without above required information you can't connect to PostgreSQL database server.
First things first, this is all pretty new to me. I would be very grateful for some help. Had all sorts of problems downloading via windows, so I did it via Linux (Ubuntu). Installed pgadmin4 in Ubuntu as well - both the web and desktop, but the web loads an error page and the desktop doesn't connect.
I've no idea what I'm meant to do to get pgadmin to work. All the details are correct, the port etc. The one weird thing is that when I look for postgres in 'services', it is not there. I know that it was there when I installed postgres via windows (before uninstalling the windows version). But I've downloaded it via Ubuntu, so not sure why it would not be showing up. When I run 'sudo service postgresql status' in Ubuntu, it shows that postgres is active. I have created a database/user and migrated and can load my server. But I cannot log into pgadmin 4 on the desktop download, it won't log in. Wbe link doesn't work.
I don't feel like this should be so complicated, but it is and it is driving me insane. Are there command line instructions I can run in Ubuntu that circumvent the need to use pgadmin as a way around this? So that I can access the table data in the schema etc.
All, I have a Centos 7 virtual machine running on vmware on my host windows 10 machine. I have installed pgAdmin 4 on windows and am trying to connect to my postgres database running on my Centos 7 VM. I have already modified the postgresql.conf and pg_hba.conf files. This is an issue when trying to connect to the VM that is running on the host machine. Do I need to setup some kind of bridged network or host-only network to get this to work? I have looked everywhere and spent hours on this with no luck. Please do not comment about postgresql.conf or pg_hba.conf settings those are correct and should not be the issue. I have also opened the firewall to port 5432.