Add new server steps:

  1. Open pgAdmin4

  2. Right click in "Servers" in Browser panel

  3. Enter some meaningful name for Server eg: "PostgreSQL9.6"

  4. Click on "Connection" tab

  5. Enter "Host" (default is "localhost" if database is installed on your own local system otherwise IP address of system where PostgreSQL database is installed)

  6. Enter "Port" (default port for PostgreSQL server is "5432")

  7. Enter "Maintenance Database" name (default is "postgres")

  8. Enter "User Name" (default user is "postgres")

  9. Enter "Password" (Password which you gave when you installed PostgreSQL database for "postgres" user)

  10. 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 Overflow
🌐
pgAdmin
pgadmin.org › docs › pgadmin4 › latest › connecting.html
Connecting To A Server — pgAdmin 4 9.16 documentation
Before you can use the pgAdmin client to manage the objects that reside on your Postgres server, you must define a connection to the server. You can (optionally) use the Server Group dialog to create server groups to organize the server connections within the tree control for easier management.
🌐
EnterpriseDB
enterprisedb.com › postgres-tutorials › connecting-postgresql-using-psql-and-pgadmin
Connecting PostgreSQL using psql and pgAdmin | EDB
For PostgreSQL: -bash-4.2$ psql -d postgres -U postgres · For Advanced Server: -bash-4.2$ psql -d edb -U enterprisedb · If connecting to a remote server from any of the operating systems, you can pass on the specific parameters in the following format: bash-4.2$ psql -h <hostname or ip address> -p <port number of remote machine> -d <database name which you want to connect> -U <username of the database server> pgAdmin is the community client for using PostgreSQL.
Discussions

Problems connecting pgadmin4 to postgreSQL
Are you trying to connect the Windows version of pgAdmin4 to the PostgreSQL server that is running under Ubuntu server that is running under Windows WSL2? I have created a database/user and migrated and can load my server. How did you do that? What do you mean by "can load my server" ? But I cannot log into pgadmin 4 on the desktop download pgAdmin4 doesn't require a login. The database you try to connect it to probably does, but it's not clear what you're actually trying to do here. Are there command line instructions I can run in Ubuntu that circumvent the need to use pgadmin The psql program ships with PostgreSQL. Run psql from the Ubuntu command prompt. Check psql documentation for the command line arguments to use. More on reddit.com
🌐 r/PostgreSQL
5
0
November 18, 2023
How to connect to postgres using pgAdmin 4
If everything about PostgreSQL is setup correctly then why ask here, on a PostgreSQL subreddit? VM networking, possibly to include port binding, is the place to look. So long as the in-VM stuff is working, via IP addresses, not unix socket, your assumption about PostgresSQL will be proven correct. More on reddit.com
🌐 r/PostgreSQL
3
0
March 11, 2021
can connect to database on command line and using the postgresql vs code addon, but not using pgadmin4
Could you find any solution? My DBeaver connects to the DB properly but PGAdmin4 struggles with the issue More on reddit.com
🌐 r/PostgreSQL
6
0
March 11, 2024
How to load sqlite3 db file in pgadmin4?
You can't. pgAdmin can only connect to a running Postgres server. It can't deal with SQLite databases. More on reddit.com
🌐 r/PostgreSQL
6
1
December 8, 2021
Top answer
1 of 4
39

Add new server steps:

  1. Open pgAdmin4

  2. Right click in "Servers" in Browser panel

  3. Enter some meaningful name for Server eg: "PostgreSQL9.6"

  4. Click on "Connection" tab

  5. Enter "Host" (default is "localhost" if database is installed on your own local system otherwise IP address of system where PostgreSQL database is installed)

  6. Enter "Port" (default port for PostgreSQL server is "5432")

  7. Enter "Maintenance Database" name (default is "postgres")

  8. Enter "User Name" (default user is "postgres")

  9. Enter "Password" (Password which you gave when you installed PostgreSQL database for "postgres" user)

  10. 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.

2 of 4
2

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.

🌐
Supabase
supabase.com › docs › guides › database › pgadmin
Connecting with pgAdmin | Supabase Docs
5 days ago - ... Add the connection info. Click the "Connect" button at the top of the page to open the connect Modal. Scroll down to "session pooler", click "view parameters" to toggle the parameters menu open and copy your connection parameters.
🌐
pgAdmin
pgadmin.org › docs › pgadmin4 › 9.13 › connecting.html
Connecting To A Server — pgAdmin 4 9.13 documentation
Use the fields on the Server dialog to define the connection properties for each new server that you wish to manage with pgAdmin. To open the Server dialog, right-click on the Servers node of the tree control, and select Server from the Register menu. ... Alternatively you can use the Cloud ...
🌐
Neon
neon.com › guides › pgAdmin4-hosted-postgres
Using pgAdmin4 with a Hosted Postgres - Neon Guides
... Right-click on "Servers" in the left sidebar and select "Create" > "Server...". In the "Create - Server" dialog, enter a name for your server connection. ... Go to the "Connection" tab.
🌐
W3Schools
w3schools.com › postgresql › postgresql_pgadmin4.php
PostgreSQL - pgAdmin 4
You will find the pgAdmin4 application in the start menu under PostgreSQL: Tip: If you cannot find it, try searching for "pgAdmin4" on your computer. Once the program has started, you should see a window like the one below, choose a master password, ...
Find elsewhere
🌐
Reddit
reddit.com › r/postgresql › problems connecting pgadmin4 to postgresql
r/PostgreSQL on Reddit: Problems connecting pgadmin4 to postgreSQL
November 18, 2023 -

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.

Top answer
1 of 2
2
Are you trying to connect the Windows version of pgAdmin4 to the PostgreSQL server that is running under Ubuntu server that is running under Windows WSL2? I have created a database/user and migrated and can load my server. How did you do that? What do you mean by "can load my server" ? But I cannot log into pgadmin 4 on the desktop download pgAdmin4 doesn't require a login. The database you try to connect it to probably does, but it's not clear what you're actually trying to do here. Are there command line instructions I can run in Ubuntu that circumvent the need to use pgadmin The psql program ships with PostgreSQL. Run psql from the Ubuntu command prompt. Check psql documentation for the command line arguments to use.
2 of 2
1
For windows: Install Postgres using the installer: https://www.postgresql.org/download/windows/ You should be able to check “pgadmin 4” during the install. Also make sure command line tools is checked. Follow the installer including setting a password for the postgres role. When done go into your start menu, find the Postgres folder and run PSQL from there. Follow the defaults and then type in your password. Make sure it lets you connect to the default “postgres” database. Then you can go back into that folder and run pgadmin. I haven’t set it up in a while but you’ll need to connect it to localhost on port 5432. If it asks for a database use postgres for now. You’ll want to make your own db for your project. There is a guide here you can try to follow (probably use a newer version of Postgres tho) https://www.postgresqltutorial.com/postgresql-getting-started/install-postgresql/
🌐
Chemical Cloud
chemicloud.com › kb › article › postgresql-database-pgadmin
Connecting Remotely to PostgreSQL Database Using pgAdmin
July 16, 2023 - Enter the IP address or server hostname you wish to connect to. For example, this could be the IP address 1.2.3.4 or a server hostname, like server.serverhostgroup.com. Enter the listener port number of the server host in the Port field.
🌐
TutorialKart
tutorialkart.com › postgresql › how-to-connect-to-a-database-server-in-pgadmin-4
How to Connect to a Database Server in pgAdmin 4
November 27, 2024 - To connect to a new PostgreSQL server, you must first add it to pgAdmin: In the left-hand navigation panel, right-click on the “Servers” node and select Register, then choose Server....
🌐
OVHcloud
support.us.ovhcloud.com › hc › en-us › articles › 21489279019155-PostgreSQL-Connect-with-pgAdmin
PostgreSQL® - Connect with pgAdmin - Support Guides - OVH
To do so, we will need to install pgAdmin, configure our Cloud Databases for PostgreSQL® instances to accept incoming connections, and finally, configure pgAdmin 4.
🌐
Medium
medium.com › itversity › connect-to-postgres-database-using-pgadmin-70d9ce2975b3
Connect to Postgres Database using pgAdmin | by Durga Gadiraju | itversity | Medium
February 10, 2025 - Create visualizations for your database structure. Launch pgAdmin and log in. Create a new server connection to your Postgres database.
🌐
pgAdmin
pgadmin.org › docs › pgadmin4 › latest › connect_to_server.html
Connect to Server — pgAdmin 4 9.16 documentation
Check the box next to respective Save Password to instruct the server to save the password for future connections; if you save the password, you will not be prompted when reconnecting to the database server with this server definition.
🌐
pgAdmin
pgadmin.org › docs › pgadmin4 › 9.14 › connecting.html
Connecting To A Server — pgAdmin 4 9.14 documentation
Use the fields on the Server dialog to define the connection properties for each new server that you wish to manage with pgAdmin. To open the Server dialog, right-click on the Servers node of the tree control, and select Server from the Register menu. ... Alternatively you can use the Cloud ...
🌐
SQL Easy
sql-easy.com › learn › how-to-connect-pgadmin-with-postgresql
How to Connect pgAdmin with PostgreSQL: Your Easy Guide to Database Integration - SQL Knowledge Center
September 22, 2023 - 1. Hostname/address: localhost (if running locally) 2. Port: 5432 3. Maintenance database: postgres 4. Username: <your-username> 5. Password: <your-password> Hit save and voila! You should now be connected to your PostgreSQL server via PgAdmin!
🌐
PhoenixNAP
phoenixnap.com › home › kb › databases › how to connect to a postgresql database from linux or windows
How to Connect to a PostgreSQL Database from Linux or Windows
December 12, 2025 - 4. To switch to a different database, type \c followed by the database name. For example, to connect to the template1 database, enter: ... Replace template1 with the name of the database you wish to connect to.
🌐
Neon
neon.com › postgresql › postgresql-getting-started › connect-to-postgresql-database
Connecting to PostgreSQL Database Server
The following illustrates how to ... browser as shown in the following picture: Second, right-click the Servers node and select Register > Server… menu to create a server · Third, enter the server name such as Local, and click ...
🌐
Reddit
reddit.com › r/postgresql › how to connect to postgres using pgadmin 4
r/PostgreSQL on Reddit: How to connect to postgres using pgAdmin 4
March 11, 2021 -

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.

🌐
pgAdmin
pgadmin.org › docs › pgadmin4 › development › connect_to_server.html
Connect to Server — pgAdmin 4 9.15 documentation
Check the box next to Save Password to instruct the server to save the password for future connections; if you save the password, you will not be prompted when reconnecting to the database server with this server definition.
🌐
CommandPrompt Inc.
commandprompt.com › education › connecting-postgresql-using-psql-and-pgadmin
Connecting PostgreSQL Using psql and pgAdmin — CommandPrompt Inc.
September 23, 2022 - In PostgreSQL, we can connect to ... using psql involves the following steps: launch psql > provide the required details like server address, port number, password, etc....