How to connect to PostgreSQL database using pgAdmin 4?
In order to set up a connection to the PostgreSQL database, run pgAdmin 4, for example, from the Start menu.
As a result, pgAdmin 4 will start.
Then click the menu "Object->Create->Server" or right-click on the item "Servers" and select "Create->Server".
The server connection settings window will open. On the General tab, we invent and enter the name of our server in the Name field.
On the Connection tab, enter the server IP address, username, password, and if you want, you can check the “Save password?” to save the password and not to enter it every time you connect. If the standard port (5432) of the PostgreSQL server has been changed, then you also need to change it here. Press the "Save" button.
Note! The PostgreSQL server must be installed, configured and running. We considered an example of installing and configuring PostgreSQL DBMS on Linux Debian in the material “Installing and configuring PostgreSQL 12 on Debian 10”.
The Object Browser will then display the connected server with available objects.