Azure Postgre SQL

tfiroz 0 Reputation points
2024-11-15T03:58:55.5466667+00:00

Hi Team,

Getting connection timed out error while connecting to Azure Postgre SQL server using Data Studio. Can someone please help?

Regards,

Tahseen

Azure Database for PostgreSQL
{count} votes

1 answer

Sort by: Most helpful
  1. ShaktiSingh-MSFT 15,766 Reputation points
    2024-11-15T05:14:37.31+00:00

    Hi tfiroz •,

    Welcome to Microsoft Q&A forum.

    As I understand, you are getting Connection Timed Out error on Azure Data Studio when connecting to Azure PostgreSQL Flexible Server.

    Could you please let us know the Server configuration details, Authentication in use (PostgreSQL auth/EntraID etc), Network Settings, Azure Data Studio (latest version)?

    Refer to this documentation: https://learn.microsoft.com/en-us/azure-data-studio/quickstart-postgres

    and for the sign-in page, please fill in the below information:

    Screenshot of the New Connection screen.

    Make sure servername is fully qualified, username is the user created for server, fill specific database name to which you want to connect.

    Check your server Networking page and allow access to it from other sources like ADS.

    It could be due to:

    • Incorrect password The password authentication failed for user <user-name> error occurs when the password for the user is incorrect. This could happen due to a mistyped password, a recent password change that hasn't been updated in the connection settings, or other similar issues.
    • User or role created without a password Another possible cause of this error is creating a user or role in PostgreSQL without specifying a password. Executing commands like CREATE USER <user-name> or CREATE ROLE <role-name> without an accompanying password statement results in a user or role with no password set. Attempting to connect with these kinds of users or roles without setting a password will lead to authentication failure with password authentication failed error.
    • Change the password If you still encounter password authentication issues after trying a different tool, consider changing the password for the user. For the administrator user, you can change the password directly in the Azure portal as described in this link. For other users, or the administrator user under certain conditions, you can change the password from the command line. Ensure that you're logged in to the database as a user with the CREATEROLE attribute and the ADMIN option on their role. The command to change the password is:

    ALTER USER <user-name> PASSWORD '<new-password>';

    • Set password for user or role created without one If the cause of the error is the creation of a user or role without a password, log in to your PostgreSQL instance and set the password for the role. For roles created without the LOGIN privilege, make sure to grant this privilege along with setting the password:

    ALTER ROLE <role-name> LOGIN; ALTER ROLE <role-name> PASSWORD '<new-password>';

    Please share screenshot with obfuscated PII data of server so that we can understand more about the error.

    Thanks

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.