In this Blog you can learn database, networking and cloud skills that will help you to understand Oracle Database and Non Oracle Database with extra key skill

Remote access from PgAdmin Console to PostgreSQL Database

No comments :
What is pgAdmin?
PgAdmin tool is development and administration platform for PostgreSQL database, manages the database PostgreSQL 9.2 and above. It may be run either as a web or desktop application. PgAdmin provides a powerful GUI that simplifies the creation, maintenance and use of the database object.




Download pgAdmin for Windows
https://www.postgresql.org/ftp/pgadmin/pgadmin4/v4.0/windows/

Lets say the PostgreSQL-11 database is installed on Linux Servers and want to manage the postgreSQL database through pgAdmin Console.

Enabling Remote connection to PostgreSQL database

1-Goto the following location as postgres user 
    su - postgres
    cd /var/lib/pgsql/11/data
2- Edit host based authentication configuration file (pg_hba.conf)  and add following lines:
host    all     all     XX.XX.XX.XX/32   trust
Note: XX.XX.XX.XX will be the client IP from where the connection will reach to database server.
3- Edit Configuration file(postgresql.conf) and do following changes in CONNECTION AND AUTHENTICATION Section
listen_addresses = '*'
port = 5432 
Note: Uncomment these two parameters and listen_address value is * means it will listen the incoming connection from any IP.
Reload the cluster: pg_ctl -D $PGDATA reload
4- Start pgadmin console, right click on server in the left pane --> Create --> Server, then add the following entries as given in the picture:

In Hostname give the IP address of the PostgreSQL Database Server, Add port which you have configured in postgresql.conf, then click on save and your connection will be created.



No comments :

Post a Comment