Postgresql

From John Freier
Revision as of 14:45, 10 September 2019 by Jfreier (Talk | contribs)

Jump to: navigation, search

Test Database Connection

This is a way to test the database connection.

 ./pg_isready -h localhost -p 5432

Application Structure

Log location

./data/log/

OSX

The Postgres app live here on OSX

 /Library/PostgreSQL/11

Start

 sudo -u postgres ./bin/pg_ctl -D ./data start

Stop

 sudo -u postgres ./bin/pg_ctl -D ./data stop

FYI, haven't tried but look like a nicer app to control Postgres is https://postgresapp.com.

Issues

Error Connecting to database FATAL : no pg_hba.conf entry for host I had to add the host ip address into the pg_hba.conf file.

location of file: ./data/pg_hba.conf

Added the following line

 host    all             all             10.225.41.95/24        md5