Install Postgres database on Windows and allow password less access

Install Postgres Database on Windows and allow password less access for the database to be used in various applications.

  1. Install Postgres database on Windows machine by downloading the executable file from here: https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
  2. pgAdmin tool can be downloaded and setup on Windows machine to view and manage the databases and tables by downloading the executable file from here: https://www.pgadmin.org/download/ Make sure to check the Postgres version and compatible version of the pgAdmin tool.
  3. phpPgAdmin can be downloaded and setup on Apache server to manage the databases from a web based enviornment. http://phppgadmin.sourceforge.net/doku.php?id=download

Now, for applications running on private & internal LAN setup, a password less access to the the postgres database is required. To allow login into the database without a password, a simple modification to the `pg_hba.conf` file is required.

  1. Edit postgre configuration file: `C:\Program Files\PostgreSQL\9.2\data\pg_hba.conf`
  2. Change all configuration access to:
    # TYPE DATABASE USER ADDRESS METHOD

    # IPv4 local connections:
    host all all 127.0.0.1/32 trust

    # IPv6 local connections:
    host all all ::1/128 trust

  3. Restart the postgres server. Go to Control Panel > Administrative Tools > Services > Restart the Postgres service.


Posted

in

, ,

by

Tags:

Comments

One response to “Install Postgres database on Windows and allow password less access”

  1. Aman Avatar

    This is a good piece of content.
    Thanks for sharing, very helpful

Leave a Reply

Your email address will not be published. Required fields are marked *