PostgreSQL: Connection to database failed: FATAL: no pg hba.conf entry for host local
From FVue
Revision as of 10:25, 27 August 2012 by Fvu (Talk | contribs) (Created page with "Category:PostgreSQLCategory: Fixed problems ==Problem== pg_dump: [archiver (db)] connection to database "<DATABASE>" failed: FATAL: no pg_hba.conf entry for host "[loca...")
Contents
Problem
pg_dump: [archiver (db)] connection to database "<DATABASE>" failed: FATAL: no pg_hba.conf entry for host "[local]", user "USER", database "DATABASE", SSL off
Solution
1. Added -h 127.0.0.1
argument to pg_dump
2. Created remote ~/.pgpass
file containing (replace USER & PASSWORD):
*:*:*:USER:PASSWORD
See also
- http://pilhuhn.blogspot.nl/2008/06/postgres-local-is-not-local-or-how-to.html
- Blog which helped me with the -h 127.0.0.1
Advertisement