# PostgreSql data source

**URL:** <https://community.grafana.com/t/postgresql-data-source/7184>\
**Category:** Configuration\
**Tags:** postgres\
**Created:** [May 2, 2018, 7:20pm UTC](https://community.grafana.com/t/postgresql-data-source/7184 "2018-05-02T19:20:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![thearasid](https://avatars.discourse-cdn.com/v4/letter/t/e274bd/32.png) [@thearasid](https://community.grafana.com/u/thearasid)\
**Post date:** [May 2, 2018, 7:20pm UTC](https://community.grafana.com/t/postgresql-data-source/7184/1 "2018-05-02T19:20:26Z")

</div>

Hello,

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.

 ![config](https://us1.discourse-cdn.com/grafana/original/2X/e/edd9ce444290ace51a2624200cc37f43b36bc269.png)

---

<div class="post-metadata">

**Author:** ![sukanya](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@sukanya](https://community.grafana.com/u/sukanya)\
**Post date:** [May 21, 2018, 1:04pm UTC](https://community.grafana.com/t/postgresql-data-source/7184/2 "2018-05-21T13:04:22Z")

</div>

hey

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