Create user mapping without password how to configure authentication
1
vote
1
answer
822
views
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 "192.168.56.10", port 5432 failed: fe_sendauth: no password supplied
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 file under /root/.pgpass with the following entries:
localhost:5432:local_db:app_user:app_user123
192.168.56.10:5432:admin:admin:admin123
192.168.56.10:5432:remote_db:test:test123
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?
Asked by Aymen Rahal
(11 rep)
Feb 18, 2023, 08:26 PM
Last activity: Mar 11, 2025, 01:02 PM
Last activity: Mar 11, 2025, 01:02 PM