Reputation: 171
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?
Upvotes: 15
Views: 23168
Reputation: 830
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 possible way is to remove the template option:
ALTER DATABASE xxx IS_TEMPLATE = false
and then you will see your database without changing PgAdmin preferences.
Upvotes: 4
Reputation: 2645
I followed the introductory advice from @MwamiTovi but I still did not have an option to create a server as he noted. However, I was able to get my databases to appear by clicking menu option Object -> Register -> Server and type in the information (hostname/address, port) from my associated psql setup.
This was using PG Admin 4.19 on macOS Big Sur.
Upvotes: 1
Reputation: 2522
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:
Note:
Note:
Note:
If you followed the steps above properly, then you should see something like this after you save.
Here's a good guide from the pgAdmin documentation
Upvotes: 29