Unable to Connect to SSL-Enabled PostgreSQL Database

Published: 20 Feb 2013
Last Modified Date: 17 Nov 2019


When you try to connect to an SSL-enabled PostgreSQL data source from Tableau Desktop, the connection might fail, and one or more of the following errors might occur:
Invalid username or password.
FATAL: no pg_hba.conf entry for host "server address", user "username", database "database name", SSL off
Unable to connect to the server "server name". Check that the server is running and that you have access privileges to the requested database.
Unable to connect to the server. Check that the server is running and that you have access privileges to the requested database.


  • Tableau Desktop 8.2.4 and earlier
  • SSL-encrypted PostgreSQL


Option 1

Use an ODBC Connection and configure SSL Mode for allow.

  1. On the Connect to Data page, select Other Databases (ODBC).

  2. For Connect Using, select the PostgreSQL Unicode driver. Click Connect.

  3. Set SSL Mode to allow.

Option 2

Use a TDC File

  • Placing the TDC files on your Tableau Server computer will stop the Tableau Server Administrative Views from working. (The TDC files require SSL for all Postrgres connections and the Administrative Views are based on Tableau Server's own Postgres database connection, which does not support SSL.)
  • Use a .tdc file only to explore or occasionally address issues with your data connection. Creating and maintaining .tdc files require careful manual editing, and troubleshooting .tdc files is beyond the scope of Tableau Support.

Download the attached postgres-ssl.tdc file, and place it in the following locations:

In Tableau Desktop:

  • \My Documents\My Tableau Repository\Datasources. 

In Tableau Server:

  • C:\ProgramData\Tableau\Tableau Server\data\tabsvc\vizqlserver\Datasources 
  • C:\Program Files\Tableau\Tableau Server\data\tabsvc\vizqlserver\Datasources 
  • C:\Program Files (x86)\Tableau\Tableau Server\data\tabsvc\vizqlserver\Datasources
Note: If Tableau Server is not installed on drive C, replace C: in the file paths above with the appropriate drive letter.

Once the TDC is in place, connect using the native PostgreSQL connector.

Additional Information

When you connect to data sources using the generic ODBC data connection, full compatibility with Tableau features cannot be guaranteed.

Discuss this article... Feedback Forum
Did this article resolve the issue?