The second way to connect to a database is by using a pgAdmin application.
The pgAdmin application allows you to interact with the PostgreSQL database server via an intuitive user interface.
The following illustrates how to connect to a database using the pgAdmin application:
First, launch the pgAdmin application from the Start menu
The pgAdmin application will launch on the web 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 the Connection tab:
Local
Fourth, enter the host and password for the postgres user and click the Save button:
postgres
Fifth, click on the Servers node to expand the server. By default, PostgreSQL has a database named postgres:
Servers
Sixth, open the query tool by selecting the menu item Tool > Query Tool:
Seventh, enter the query in the Query Editor and click the Execute button, you will see the result of the query displayed in the Data Output tab:
https://neon.com/postgresql/postgresql-getting-started/connect-to-postgresql-databasearrow-up-right
Last updated 4 months ago