I'm trying to make it so that local connections to the database don't require a login. So I added the line local all all trust to the pg_hba.conf file, but then when I load pgAdmin and try to connect to the server it just says FATAL: could not load pg_hba.conf. What am I doing wrong?
Asked
Active
Viewed 3.7k times
7
Colin 't Hart
- 9,455
- 15
- 36
- 44
temporary_user_name
- 193
- 1
- 2
- 7
2 Answers
4
There is likely an invalid entry in pg_hba.conf file. Reload it and then check the PostgreSQL server log for any pg_hba.conf error:
pg_ctl reload -D $PGDATA
Jack Douglas
- 40,517
- 16
- 106
- 178
francs
- 1,457
- 1
- 15
- 25
2
The problem is that this postgres version under win7 can not handle local connections. I had to work with pg very urgently on my local computer so I did not care too much about security so maybe this is not the best solution for a live environment. But my local PC it was enough.
I removed all other uncommented lines from pg_hba.conf and left in only the following one:
host all all ::1/0 trust
After this I could connect via command line.
I do not understand why the manual tells no more about this issue. I am pretty sure many people have problem with this.
halmai
- 31
- 1