2

I having issue connection to postgres, I am installing at windows 10 via the EDB installer (version 13.2) . I follow all the steps it install fine however when I try to enter the default database using pgadmin it I always get stuck at this error :

Please enter the password for the user 'postgres' to connect the server - "PostgreSQL 13"

during instalation postgres ask me to specify my master Password. then when instalation finish and I open my pgadmin it again ask me to enter the master password so I did and I was able to successfully login but when I try to open the default database that when it ask me to enter password for posgres user , I try to use the my master password but it did not work

I installed and uninstall it many time with no success. I also tried this solution so I did change the Method in pg_hba.config from scram-sha-256 to trust however when I executed this command psql -U postgres it again asked me for the password

any help please

Youssef
  • 165
  • 2
  • 17
  • 1
    Your description is very vague. That makes it very hard to determine what you did wrong. You should try harder: What operation system? How exactly did you install PostgreSQL? What choices did you make during the installation process? What are the exact steps you did when you messed with `pg_hba.conf`? etc, etc. – Laurenz Albe Apr 28 '21 at 18:00
  • When you installed Postgres using the EDB installer(I presume) it asked you to create an admin password. That is the password you need to use for the `postgres` user. – Adrian Klaver Apr 28 '21 at 22:41
  • @AdrianKlaver during instalation yes exacttly it ask me to specify my master Password. then when instalation finish and I open my pgadmin it again ask me to enter the master password so I did and I was able to successfully login but when I try to open the default database that when it ask me to enter password for `posgres ` user , I try to use the my master password but it did not work – Youssef Apr 29 '21 at 10:48
  • Are you confusing the password that was requested here [EDB Installer](https://www.enterprisedb.com/docs/supported-open-source/postgresql/installer/02_installing_postgresql_with_the_graphical_installation_wizard/01_invoking_the_graphical_installer/) with the one for opening `pgAdmin`? – Adrian Klaver Apr 29 '21 at 14:35
  • no I am not confusing them. the password in EDB installer is master password I already used it and I was alble to enter `pgadmin` , the password requested is the password for 'postgres' user – Youssef Apr 29 '21 at 16:53
  • Per the link I posted the password you created via the installer is for the `postgres` user. So either you are not remembering the password correctly or you are connecting to a Postgres instance that was not set up by the installer and uses a different password. – Adrian Klaver Apr 29 '21 at 23:45
  • @Youssef, I'm in the same boat: I've installed PostGreSQL and PGAdmin4 every which way I can think of, and nothing is working, and I'm getting the exact same issue: during installation, you are prompted to set a Master password. When you first open PGA4, you have to put in your master password. Having successfully remembered it from 22 seconds earlier, I can get into PGA4, but then get prompted for the password for user 'postgres' as soon as I touch the default instance, and no, the master password does NOT work. – Dustin Kreidler Nov 27 '21 at 13:31

2 Answers2

1

You made the same mistake I did: you installed pgAdmin4 without installing postGreSQL server itself. The server installation does indeed set the Master password and the postgres user password at the same time, as the commenters were trying to point out. JUST installing pgAdmin sets a master password for the Admin environment. I don't really understand how there's not a more useful error for trying to connect to a server instance that doesn't actually exist, but here we are.

Dustin Kreidler
  • 168
  • 1
  • 9
0

try it. it resolves for me step 1 step1

step2 enter image description here

mailtime
  • 111
  • 1
  • 8