$ psql -d database -U username -Wpsql: FATAL: Ident authentication failed for user "username"
fix
# vi /var/lib/pgsql/data/pg_hba.conf
This file contains the hosts allowed to connect, clients authenticatation, database users to use, which databases can be accessed
By default postgresql uses IDENT-based authentication. IDENT will never allow you to login via -U and -W options.
So a
ppend following lines to allow login from localhost :local all all trust host all 127.0.0.1/32 trust
esc -> wq -> enter
# service postgresql restart
$ psql -d database -U username -W
now you can able to connect
No comments:
Post a Comment