PostgreSql data source


I am trying out the free grafana instance and I am unable add a data source , which is a postgresql db running on a localhost.

I have no problem to connect to the db using the pg_admin with the same settings, but when I try it with grafana
I am getting dial tcp [::1]:5432: getsockopt: connection refused.

Can you please tell me what could be wrong?

Thank you.


Did you connect to the postgreSQL.? What credentials should we give.?