0

My program can well connect to my local PostgreSQL 13 server with these parameters :

username = Juan
password = <password in hex>
host = localhost
port = 5432
dbname = madrid
schema = huv_2.9
sslmode = allow

But on PGAdmin, when i try to create a server connection, it's refused.

PgAdmin prompts for a password with this message :

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

And my password (hashed, encrypted or in clear text) don't work.

I think i'm in the same case as people who have to switch from scram-sha-256 to md5 : Link to my potential problem

Why i can't set PGAdmin to connect to my local server as my program does (and so forget about scram-sha-256 and md5) ?

Why PGAdmin can not ignore the conf files in C:\Program Files\PostgreSQL\13\Data ? My program well do it.

floupinette
  • 150
  • 11
  • 1) Postgres is has a client server architecture and the connection between them is controlled by the conf files via the server 2) So your program is not ignoring the conf files as they are read by the server not the client. 3) Where are you getting the password prompt, in the pgAdmin GUI or the pgAdmin version of `psql`. – Adrian Klaver Apr 24 '23 at 21:54
  • Issue this queries to find out the state of your configuration: `SHOW password_encryption;` and `SELECT rolpassword from pg_authid where rolname = 'Juan';` and post results (in case of your encrypted password just the algorithm prefix to avoid posting sensitive info). – Pepe N O Apr 24 '23 at 21:55
  • Also are you using the master password for pgAdmin4 that you where asked to create on install? – Adrian Klaver Apr 24 '23 at 22:00
  • It's in pgAdmin GUI. The first prompt is "Please enter your master password. This is required to unlock saved passwords and reconnect to the database server(s)." No problem I know it. The second prompt is "Please enter the password for the user 'postgres' to connect the server - "PostgreSQL 13"" And this one i can't go through. – floupinette Apr 24 '23 at 22:05
  • So when you supply the database password as plain text what is the error message? Add information as update to question not in comments. – Adrian Klaver Apr 24 '23 at 22:44
  • You say your program can do it, but what is that program? What you showed is not a program, it looks like some config file, but with no clue as to what programming language it is for. – jjanes Apr 24 '23 at 23:11
  • 1
    Does it ask for the password for 'Juan', or for 'postgres'? – jjanes Apr 24 '23 at 23:12

0 Answers0