Relative Content

Tag Archive for javapostgresqlwindows

java – postgress authentication failing even though host,port,username,password are correct

I’m a .NET dev trying to learn java. I have a postgres instance running at localhost:5432 using docker, with database “knowledgemap”, username “knowledgemap” and password “test123”. I’m able to connect to this postgres instance using a .NET application and do all operations correctly. But when I’m try to connect to it using my java application, it’s breaking with the error message FATAL: password authentication failed for user "knowledgemap". I’m using a windows 11 laptop. I checked the firewall settings and allowed java and IntellijIDEA to use public and private networks, but still getting the error. Please give any advice where to start debugging this issue.