Reason: It means that PostgreSQL server is trying to authenticate a user using the Ident protocol, and can’t.
Solution: We have to change the ident to password in the pg_hba.conf file.
Step1: Get the configuration file running the command show hba_file;
Step2: Go to the pg_hba.conf file path
Before
# "local" is for Unix domain socket connections only local all all peer # IPv4 local connections: host all all 127.0.0.1/32 ident # IPv6 local connections: host all all ::1/128 ident
After
# "local" is for Unix domain socket connections only local all all peer # IPv4 local connections: host all all 127.0.0.1/32 password # IPv6 local connections: host all all ::1/128 password
3. Reload the PostgreSQL server by running the command pg_ctl reload from Unix shell or SELECT pg_reload_conf(); from psql utility.
4. Then, try to connect to the server.