Forum Discussion

Khushidesai0109's avatar
Khushidesai0109
Skilled Sharer
1 year ago

Cannot connect to postgres SQL to power BI desktop occurring the error

 The issue is that I have also downloaded NpgSql yet this issue is I am suffering Please help me for same

 

5 Replies

      • QADIPHIS's avatar
        QADIPHIS
        New Member

        Hi, Did you find a solution to this problem? And if so can you please assist, im having the same problem


  • Hi Khushidesai0109 

    It seems like you're encountering a connection issue with PostgreSQL in Power BI. Here are steps to troubleshoot and resolve the problem:

    Steps to Resolve:
    Verify Credentials:

    Ensure that the username and password you entered are correct. Typos can often cause authentication errors.
    Try logging into the database directly using a tool like pgAdmin or a command-line interface to confirm that the credentials work.
    Check User Permissions:

    Confirm that the user has the appropriate permissions to access the database at the specified host and port.
    Npgsql Installation:

    Ensure that the Npgsql connector is installed and updated to the latest version.
    If you suspect a conflict or an incorrect version, uninstall and reinstall Npgsql.
    Database Address and Port:

    Double-check the database server address (host) and port.
    If the database is running locally, try using localhost or 127.0.0.1.
    Firewall and Network Settings:

    Make sure the PostgreSQL port (default is 5432) is open on your network and firewall.
    Test connectivity by pinging the host address to ensure the server is reachable.
    Power BI Version:

    Ensure that you are using the latest version of Power BI Desktop, as older versions may have compatibility issues with PostgreSQL connections.
    PostgreSQL Configuration:

    Check the pg_hba.conf file in PostgreSQL and ensure it allows connections from your IP. For example:
    css
    code:
    host all all 0.0.0.0/0 md5
    Database Logs:

    If the issue persists, check the PostgreSQL logs for more details on why the connection is failing.
    Verify SSL Requirements:

    Some PostgreSQL instances require SSL connections. If so, enable SSL in the connection settings in Power BI and provide the necessary certificates if required.

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Khushidesai0109 

     

    Thanks for the reply from Tahreem24 and Ritaf1983 .

     

    If your problem still hasn't been resolved, you might consider trying the following. Here's a post I found with a similar error to yours. The solution in it is: Go to File –> Options and Settings –> Data Source Settings, under Global Permissions, select clear old data source connection permissions, and then click Edit Permissions in Power BI Desktop. Then try to connect again and check if it succeeds.

     

    Solved: We couldn’t authenticate with your credentials. Pl... - Microsoft Fabric Community

     

    Hope this helps!

     

    Best Regards,
    Yulia Xu