Regarding this issue, you need to locate your pg_hba.conf. The command is:
find / -name 'pg_hba.conf' 2>/dev/null
and after that change the configuration file:
Postgresql 9.3
Postgresql 9.4
The next step is: Restarting your db instance:
service postgresql-9.3 restart
If you have any problems, you need to set the password again:
ALTER USER db_user with password 'db_password';
If you want to learn more about SQL, Check out this SQL Certification by Intellipaat.