Answer the question
In order to leave comments, you need to log in
How to connect PostgreSQL to a web application?
How to edit pga_hba.conf?
java postgresql9.6
I'm using PostgreSQL 9.6.8 pgAdmin3, I'm trying to connect a database to an application and I ran into this problem: If I use the default pga_hba.conf settings, it gives me that the user has not been authenticated (by password) (pjdbc: autodetected server -encoding to be Cp1251...) This is probably because in this case the client is asked for a password twice hashed with the MD5 algorithm. If I change the settings, then I get an error that the file is not found and even the database does not start.
PS I use the Ultimate Idea, I opened the Database on the right and everything connected to the database normally.
Answer the question
In order to leave comments, you need to log in
pga_hba.conf can be edited as you like, it has nothing to do with the database (well, unless you just redefined hba_file with your hands).
And the file of authorization rules pg_hba.conf must be edited with a text editor, preferably some kind of adequate one that will not engage in amateur activities with the rights, names, owners and contents of the file. After making changes to pg_hba, you need to command reload the database.
A request from the superuser is preferable, because platform independent.
Once hashed according to the md5 authentication method of the libpq protocol.
And of course, you need to understand what is changing and where exactly. pg_hba is processed in order from top to bottom and the rule can be specified even corny in the wrong place.
Plus, when reloading, look in the log, format error messages will be there.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question