Taras Shumylo
asked on
pg_dump doesn't ask me for password but produce error "Ident authentication failed"
I run
It DOES NOT ask me to enter password
If I run
I get password prompt, but after entering password same error.
How can I authenticate to make pg_dump?
pg_dump test_database -U test_user -h localhost > backup
and getpg_dump: [archiver (db)] connection to database "test_database" failed: FATAL: Ident authentication failed for user "test_user"
It DOES NOT ask me to enter password
If I run
pg_dump test_database -U test_user -W -h localhost > test_database.bck
I get password prompt, but after entering password same error.
How can I authenticate to make pg_dump?
ASKER
I get
pg_dump: invalid option -- 'd'
Try "pg_dump --help" for more information.
ASKER
If I run
But if I run
sudo -i -u test_user
And thenpg_dump test_database > test_database.bck
the command succeedBut if I run
sudo -i -u test_user
and thenpg_dump test_database -U test_user -h localhost > test_database.bck
I got errorpg_dump: [archiver (db)] connection to database "test_database" failed: FATAL: Ident authentication failed for user "test_user"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Nobody provided solution.
pg_dump -d test_database -u test_user