# Redshift as PostgreSQL Data Source - Failed to connect to server

**URL:** <https://community.grafana.com/t/redshift-as-postgresql-data-source-failed-to-connect-to-server/54516>\
**Category:** Grafana\
**Created:** [October 10, 2021, 1:31pm UTC](https://community.grafana.com/t/redshift-as-postgresql-data-source-failed-to-connect-to-server/54516 "2021-10-10T13:31:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![simovelichkov](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/simovelichkov/32/19071_2.png) [@simovelichkov](https://community.grafana.com/u/simovelichkov)\
**Post date:** [October 10, 2021, 1:31pm UTC](https://community.grafana.com/t/redshift-as-postgresql-data-source-failed-to-connect-to-server/54516/1 "2021-10-10T13:31:41Z")

</div>

- What Grafana version and what operating system are you using?

> Grafana v8.2.0 (d7f71e9eae)

- **What** are you trying to achieve?

Use Redshift as PostgreSQL data source.

- **How** are you trying to achieve it?

I have set my host:port, database, user and password. My password contains the following special characters `.` and `!`. TLS/SSL is disabled.

- What happened?

When I click `Save and Test` I’m happily greeted by the `Database Connection OK` message, however after using the chrome inspector things look a bit different:

- `/api/datasources/uid` request seems ok, even though my password is an empty string, I’m seeing that `secureJsonFields: {password: true}` so I guess that’s fine
- `/api/ds` errors out with `db query error: failed to connect to server - please inspect Grafana server log for details` when trying the `SELECT 1` query. This request returns `400 Bad Request` but the UI is fine with it

Note that I am able to connect to my database using the exact same credentials. Also my `/var/log/grafana` folder is empty for whatever reason. I’m running the Docker contains with the default settings.

- What did you **expect** to happen?

I read through the few issues available here and on GitHub and even though they seem a bit outdated at this point the hint at that using Redshift as data source is actually possible. So, I was looking for that.

- Can you copy/paste the configuration(s) that you are having problems with?

It’s really my credentials only, and as I mentioned earlier they work outside of Grafana.

- Did you receive any errors in the Grafana UI or in related logs? If so, please tell us **exactly** what they were.

> db query error: failed to connect to server - please inspect Grafana server log for details

on `SELECT 1` but the UI tells me that `Database Connection OK`

- Did you follow any online instructions? If so, what is the URL?

I used this one [Run Grafana Docker image | Grafana documentation](https://grafana.com/docs/grafana/latest/installation/docker/)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/grafana/original/2X/e/ef5308cc58c9e5a13187b5012eb99f406928462f.png) [@system](https://community.grafana.com/u/system)\
**Post date:** [October 10, 2022, 1:32pm UTC](https://community.grafana.com/t/redshift-as-postgresql-data-source-failed-to-connect-to-server/54516/2 "2022-10-10T13:32:13Z")

</div>

This topic was automatically closed after 365 days. New replies are no longer allowed.
