Connection with my db using pgAdmin4
Adding 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.
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.