Connect Azure PostgreSQL with psql command prompt to query a database

To connect to Azure PostgreSQL Server by using psql command prompt, perform the following steps:

  • To avoid below error.

Add you local IP address to give access to connect PostgreSQL with your psql command prompt.

Start psql cmd on your computer and enter the details.

Enter the password to connect

Create and connect database.