Quickstarts for Azure Database for PostgreSQL

Get started quickly with Azure Database for PostgreSQL. These quickstart guides provide step-by-step instructions to set up and connect to your PostgreSQL server on Azure.

1. Create an Azure Database for PostgreSQL server

Learn how to provision a new PostgreSQL server instance using the Azure portal, Azure CLI, or PowerShell.

  1. Navigate to the Azure portal.
  2. Search for "Azure Database for PostgreSQL servers" and select "Create".
  3. Configure your server name, resource group, administrator credentials, version, and location.
  4. Choose a pricing tier and compute size based on your needs.
  5. Review and create the server.

Tip: For command-line automation, explore the Azure CLI commands:

az postgres server create --resource-group myresourcegroup --name mydemoserver --admin-user myadmin --admin-password YourPassword --sku-name Standard_B1ms --location eastus

2. Connect to your PostgreSQL server

Discover different methods to connect to your newly created PostgreSQL server from various clients and applications.

  • Using psql: Connect using the command-line tool.
  • Using Azure CLI: Utilize Azure CLI commands for connection management.
  • Using application connection strings: Obtain and use connection strings for popular programming languages (Python, Java, Node.js, etc.).

You can find your server name and connection details in the Azure portal under the server's "Overview" page.

3. Create and manage databases

Understand how to create new databases within your PostgreSQL server instance and perform basic management tasks.

  • Connect to your server using your preferred client.
  • Execute SQL commands to create databases, tables, and insert data.
  • Example SQL command: CREATE DATABASE mydatabase;

Next Steps:

After completing these quickstarts, you can explore advanced topics like configuring server parameters, setting up replication, implementing security best practices, and integrating with other Azure services.

Explore Tutorials | Learn Core Concepts