trust
connection by adding inpg_hba.conf
file
local all postgres trust
- Restart postgresql service
sudo service postgresql restart
psql -U postgres
- At the
postgres=#
prompt, change the user namepostgres
password:
ALTER USER postgres with password ‘new-password’;
- Revert the changes in
pg_hba.conf
file fromtrust
tomd5
and restartpostgresql
yet when i try to test psql -U postgres -W
it will give me this error:
[root@localhost rt-4.4.3]# psql -U postgres -W
Password for user postgres:
psql: FATAL: Peer authentication failed for user “postgres”
[root@localhost rt-4.4.3]#
pls how can i go about this?