PostgreSQL La base de donnees la plus sophistiquee au monde.


Le forum officiel de la communauté francophone de PostgreSQL

Vous n'êtes pas identifié(e).

#1 17/02/2023 15:14:46


create user mapping without password,how to configure authentication ?

I am trying to create a user mapping in PostgreSQL without a password, but I am encountering an error that says

local_db=> select * from employee;
ERROR:  could not connect to server "testmachine02"
DETAIL:  connection to server at "", port 5432 failed: fe_sendauth: no password supplied
local_db=> exit

when I try to access a table. Here is the command that I used to create the user mapping:

CREATE USER MAPPING for app_user SERVER testmachine02 OPTIONS (password_required 'false');

I also created a pgpass under /root/.pgpass file with the following entries:


Despite these steps, I am still unable to access the table without a password. How can I create a user mapping without a password and access the table?

Hors ligne

Pied de page des forums