June 19th, 2013, 08:54 AM
Password authentication failed
I had version 9.2 and upgraded to 9.2.4, by complete deinstall 9.2 and make a new 9.2.4 installation. I recreated the login role "u_finance" with same password as before, then I made a restore of the 9.2 backup. All works fine except for one issue: when trying to connect from my java application with user u_finance , the following exception occurs:
2013-06-19 08:24:19 CEST FATAL: password authentication failed for user "u_finance"
I didn't change anything on the java side. When using user "postgres" for login within java, then all works fine.
Was there anything changed since 9.2.4 regarding logins ?
June 26th, 2013, 09:02 PM
Did you set up the u_finance role and adjust the new Postgres installation's pg_hba.conf? (usually somewhere like /var/lib/pgsql/9.2/data/pg_hba.conf)
June 28th, 2013, 09:02 AM
No change to pg_hba.conf
I didn't change anything in the file pg_hba.conf. Should I change something ?
June 28th, 2013, 11:27 AM
You almost definitely need to make changes to the default pg_hba.conf. Postgres actually has some of the best documentation of any software around anywhere (open source or otherwise). check it out.
And don't stop at that link. If you start from the beginning you'll learn a ton of fascinating stuff not just about what Postgres can do, but about how to really use a database in general. In fact, reading the Postgres docs in their entirety often acts like the red pill on developers and might leave you scratching your head at the insane trash many (these days most?) developer tribes do to make their data sorta-kinda work through Database Agnostic Framework X.