0Pricing
Cloud & IT Cert Prep · Lesson

Azure Database for Open-Source Engines

Use managed services for PostgreSQL, MySQL, and MariaDB on Azure, and compare them with running your own engine on a VM.

Azure Database for Open-Source Engines is a free Cloud & IT Cert Prep lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cloud & IT Cert Prep learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

Why Managed Open-Source Databases?

Many organisations run open-source relational engines — PostgreSQL, MySQL, and MariaDB — as the backbone of their applications. Rather than managing these engines on VMs (patching, backups, HA configuration), Azure provides fully managed PaaS services that handle the operational heavy lifting while keeping the familiar SQL interface your developers already know.

Azure Database for PostgreSQL

Azure Database for PostgreSQL is a fully managed service supporting PostgreSQL versions 11 through 16. It offers two deployment modes: Single Server (being retired) and Flexible Server, the current recommended option. Flexible Server gives you a choice of burstable, general purpose, and memory-optimised compute tiers, and supports standby replicas within or across availability zones for high availability.

# Create a Flexible Server PostgreSQL instance
az postgres flexible-server create \
  --resource-group myRG \
  --name mypgserver \
  --location eastus \
  --admin-user pgadmin \
  --admin-password 'P@ssw0rd!' \
  --sku-name Standard_D2s_v3 \
  --tier GeneralPurpose \
  --version 16 \
  --high-availability ZoneRedundant

PostgreSQL Flexible Server Features

Flexible Server includes zone-redundant high availability with automatic failover to a standby replica in a different zone, read replicas you can add to offload reporting queries, and point-in-time restore with a retention window of 7 to 35 days. The service also supports popular PostgreSQL extensions such as PostGIS (geospatial), pgvector (vector embeddings for AI), and pg_cron (scheduled jobs).

Azure Database for MySQL

Azure Database for MySQL supports MySQL Community Edition versions 5.7 and 8.0. Like PostgreSQL, it uses the Flexible Server deployment model with burstable, general purpose, and memory-optimised compute tiers. Automatic backups, patching, and monitoring are included. This service is widely used as the managed backend for PHP and web applications that rely on MySQL.

# Create a MySQL Flexible Server
az mysql flexible-server create \
  --resource-group myRG \
  --name mymysqlserver \
  --location eastus \
  --admin-user mysqladmin \
  --admin-password 'P@ssw0rd!' \
  --sku-name Standard_D2ds_v4 \
  --tier GeneralPurpose \
  --version 8.0

Azure Database for MariaDB

Azure Database for MariaDB supports MariaDB versions 10.3, 10.4, and 10.6. MariaDB is a community fork of MySQL with additional storage engines and a faster release cycle. The managed Azure service is functionally similar to MySQL Flexible Server in terms of HA, backup, and security features. Note that Microsoft has announced deprecation of this service in 2025, encouraging migration to MySQL Flexible Server.

Managed vs. Self-Hosted on a VM

Running an open-source database on an Azure VM gives you maximum control — any version, any extension, any OS setting — but makes you responsible for patching, backups, HA configuration, monitoring, and storage management. The managed PaaS services trade some configuration flexibility for substantial operational savings. For most standard OLTP workloads, managed services are the right default choice.

Compute Tiers Compared

All three managed services share the same compute tier structure. Burstable (B-series) is ideal for development and low-traffic workloads that don't need constant full CPU. General Purpose (D-series) suits most production OLTP applications. Memory Optimised (E-series or higher) is designed for workloads with large working sets, such as analytics queries or in-memory caching patterns.

Storage and IOPS Configuration

Flexible Server decouples compute and storage. Storage is backed by Azure Premium SSD and scales from 20 GB up to 64 TB. You can enable Storage Autogrow so the service automatically expands storage when it reaches 90% capacity, preventing downtime due to a full disk. IOPS scale with the provisioned storage size, or you can provision additional IOPS independently.

# Enable storage autogrow on PostgreSQL
az postgres flexible-server update \
  --resource-group myRG \
  --name mypgserver \
  --storage-auto-grow Enabled

Security: Private Access and Encryption

Flexible Servers support two networking modes: public access with firewall rules (same concept as Azure SQL Database) and private access (VNet integration), where the server is injected into a delegated subnet and is not reachable from the internet at all. All data at rest is encrypted with AES-256, and all connections require TLS by default, with older TLS versions able to be enforced to minimum TLS 1.2.

Read Replicas for Scale-Out

All three managed open-source services support read replicas — asynchronous copies of your primary server that accept read-only connections. Applications direct analytical or reporting queries to replicas, reducing load on the primary. Replicas can be in the same region or in a different Azure region (cross-region replicas), providing a geographic read distribution strategy and a possible disaster recovery target.

# Add a read replica to PostgreSQL server
az postgres flexible-server replica create \
  --resource-group myRG \
  --replica-name mypgserver-replica \
  --source-server mypgserver

Monitoring and Intelligent Insights

Azure Database for PostgreSQL and MySQL integrate with Azure Monitor out of the box. Key metrics such as CPU percentage, memory utilisation, storage I/O, active connections, and replication lag stream into the Azure portal. Query Performance Insight surfaces the top resource-consuming queries, enabling you to add indexes or rewrite queries without running expensive EXPLAIN commands manually.

Quick Check

Test your understanding of Microsoft Azure Fundamentals (AZ-900) concepts from this lesson.

Lesson Recap

In this lesson you learned: Azure provides fully managed services for PostgreSQL, MySQL, and MariaDB, Flexible Server is the recommended deployment model with HA, read replicas, and VNet integration, and managed services eliminate patching and backup responsibilities compared to self-hosted VMs. Next up we explore strategies and tools for migrating databases to Azure.

Frequently asked questions

Is the “Azure Database for Open-Source Engines” lesson free?

Yes — the full text of “Azure Database for Open-Source Engines” is free to read here on the web, and the Cloud & IT Cert Prep course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cloud & IT Cert Prep course, upgrade to CoddyKit PRO.

What will I learn in “Azure Database for Open-Source Engines”?

Use managed services for PostgreSQL, MySQL, and MariaDB on Azure, and compare them with running your own engine on a VM. You practise Cloud & IT Cert Prep with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start Cloud & IT Cert Prep?

No prior experience is required. Cloud & IT Cert Prep on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Azure Database for Open-Source Engines” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this Cloud & IT Cert Prep lesson?

Yes. Every Cloud & IT Cert Prep lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. Azure SQL Database
  2. Azure Cosmos DB: Global NoSQL
  3. Azure Database for Open-Source Engines
  4. Database Migration to Azure
← Back to Cloud & IT Cert Prep