'Databases in psql Don't Show up in PgAdmin4
I installed Postgres

and followed the instruction. I create a database and logged in by the master password but I don't find the database even the + mark is not shown in the servers. can anyone help, please?
Solution 1:[1]
Unlike in pgAdmin3, with pgAdmin4,
here you have to manually connect to a running postgres server and
you already have your specific database (DB) created.
So to set the stage, make sure you have the postgres server is running, and that you have created that DB already too.
Notice (in the image) that I CREATE database XYZ and GRANT all privileges to default user postgres. (Note; to work properly with pgAdmin4, you have to create a user called postgres in order to be able to connect with and log in to pgAdmin4.)
Then here are some quick steps to follow:
- When within pgAdmin4, right-click the Servers option and select create.
Note:
- In the image you'll see (1) next to "Servers" because I have done this process already. Kindly ignore that).
- Select "server group" if you have many servers that you want to better manage. For most basic use cases, go ahead and select "server" (like I did).
- For either option you select above, you'll get a pop-box to complete the "connection process". I selected "server" which is appropriate for your use case (see image below).
Note:
- "name" field is required
- As you can see already, enter a name (I went with "postgres" since it's what I was used to by default in pgAdmin3, but you can enter any name).
- Notice the "connect now" checkbox is checked by default so as soon as the process is successful, your DB should display in the sidemenu. (This is a key to confirm that you entered the right info). But you can always uncheck this, to connect later.
- Now, click connection tab and you see the image below.
The key fields to fill here, to keep it simple, are host name/address and password. Remember to save after entering your info.
Note:
- If on connecting to local machine, localhost or http://127.0.0.1 should do. (I did "localhost")
- If connecting to a DB instance in the cloud e.g. AWS, enter the endpoint in the host space.
Here's more from AWS - A lot of the other fields have the default settings used when installing postgres and pgAdmin.
If you followed the steps above properly, then you should see something like this after you save.
Solution 2:[2]
In case you created your database as template CREATE DATABASE ... IS_TEMPLATE =true, then the database is considered as "system object" and is not shown in the list if PgAdmin4 option "Show system objects?" is set to false.
Try menu File -> Preferences, in the tree find Browser -> Display, and the option is at the bottom.
Another option is to remove the template option:
ALTER DATABASE xxx IS_TEMPLATE = false
and then you will see your database without changing PgAdmin preferences.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | Jindrich Vavruska |





