PostgreSQL: Connection to database failed: FATAL: no pg hba.conf entry for host local

From FVue
Jump to: navigation, search

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

Comments

blog comments powered by Disqus