1

I want to connect to the heroku postgres database I have set up using spring boot java. But before that I wanted to try and connect using pgAdmin 4. When I tried this I got an error saying the authentication for the 'username' had failed. Then I started adding the database to my application.proporties file in spring boot to test it there. I got the samen error message. This is the error message I got in spring boot: org.postgresql.util.PSQLException: FATAL: password authentication failed for user "username". I then even tried it in DBeaver. But still the same error.

heroku postgres credentials

application.properties in spring boot java

I checked multiple times if the password and username are the same. I really don't know what to do now, because I can't find any documantation on the heroku website

2
  • "I checked multiple times if the password and username are the same." The same as what? Commented Apr 26, 2022 at 17:14
  • Is there any tool/location from which you can connect? If so, please describe it. Commented Apr 26, 2022 at 17:16

1 Answer 1

1

I'm NO EXPERT but I did have the same problem. I think I fixed it on the page with fields for Host, Port, Maintenance database, Username, Password, ... and then by toggling "save password."

Sign up to request clarification or add additional context in comments.

2 Comments

For some reason, Heroku no longer updated DATABASE_URL automatically. I had to go to the Settings page, Reveal Config Vars, and then manually copy from the new env variable HEROKU_POSTGRESQL_MAROON_URL into the more env variable name used by my code. Is Heroku degrading?
Heroku sent this email: "Your database... on ... requires maintenance. During this period, your database will become read-only. Once maintenance has completed, your database credentials and hostname will have changed, but we will update your app's config variables accordingly to reflect the new database connection string." I had to manually reconfigure mine too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.