Forum Discussion
Power BI Postgres connection issues (credentials/invalid certification)
Hi koralka ,
Please try below things to fix the issue.
1. Sometimes Power BI fails to resolve the server correctly unless the port is explicitly specified. Try using the below thing in the server field when connecting.
your-db-hostname:5432
2. Check the PostgreSQL server allows connections from your IP and uses the correct authentication method.
host all all 0.0.0.0/0 md5
Note: If you are using SSL, change md5 to scram-sha-256 or cert as needed. And then restart PostgreSQL after editing this file.
3. Power BI uses the Npgsql .NET driver to connect to PostgreSQL. If it's outdated or misconfigured. Download Npgsql v4.0.17 latest supported by Power BI. During installation, check "GAC Installation" to ensure it's registered system-wide.
4. If native connector fails, use an ODBC connection. Install PostgreSQL ODBC driver.
Set up a DSN and connect via Power BI using ODBC instead of the native PostgreSQL connector. This bypasses some of the native connectors.
5. If other databases work but this one doesn’t, Check if the user role has access to the specific database. Check the user has CONNECT privileges on the database.
GRANT CONNECT ON DATABASE your_db TO your_user;
6. Check you are using the latest Power BI Desktop. Older versions may have compatibility issues with newer PostgreSQL setups or Npgsql versions.
7. Enable Logging in Power BI to get more insight. Enable diagnostic logging in Power BI Desktop.
File --> Options --> Diagnostics --> Enable tracing
Check logs in below path.
C:\Users\<YourUser>\AppData\Local\Microsoft\Power BI Desktop\AnalysisServicesWorkspaces
I hope this information helps. Please do let us know if you have any further queries.
Regards,
Dinesh
Hi koralka ,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.
Regards,
Dinesh