Azure Documentation

Your comprehensive guide to Azure services

Key Concepts for Azure Database for MySQL

This document covers the fundamental concepts that underpin Azure Database for MySQL. Understanding these concepts will help you design, deploy, and manage your MySQL databases effectively on Azure.

Server Concepts

An Azure Database for MySQL server is the central management unit for your MySQL database. It contains databases, logins, firewall rules, and other administrative settings. You can provision a server in two deployment options:

  • Single Server: A fully managed MySQL database service that handles most of the database management functions like patching, backups, and high availability without user intervention. Ideal for new cloud applications and lift-and-shift scenarios.
  • Flexible Server: Provides more granular control over database management and configuration. Offers more flexible pricing options, improved resource control, and higher availability features. Recommended for production workloads that require greater control.

Database Concepts

Within each Azure Database for MySQL server, you can create multiple databases. Each database is a collection of tables, views, stored procedures, and other database objects, just like in a traditional MySQL instance. You can connect to these databases using standard MySQL clients.

Compute and Storage Tiers

Azure Database for MySQL offers different compute and storage tiers to meet your performance and cost requirements:

  • General Purpose: Designed for most business workloads that require a balanced compute and I/O performance.
  • Memory Optimized: Built for high-performance database workloads that require in-memory performance for faster transaction processing and higher concurrency.

Storage is provisioned independently and can be scaled up as needed. IOPS (Input/Output Operations Per Second) are tied to the provisioned storage amount.

Connectivity

Connecting to your Azure Database for MySQL server involves several components:

  • Firewall Rules: Control access to your server by specifying IP address ranges. You can set server-level or database-level firewall rules.
  • Virtual Networks (VNet): For enhanced security, you can deploy your server within an Azure Virtual Network, restricting access to only resources within that VNet.
  • Private Link: Provides private connectivity from your Azure Virtual Network to the Azure Database for MySQL service, ensuring that traffic stays within the Microsoft network.

High Availability and Disaster Recovery

Azure Database for MySQL provides robust options for ensuring business continuity:

  • Built-in High Availability (Single Server): Automatically provides high availability with automatic failover.
  • Zone-Redundant High Availability (Flexible Server): Offers HA by replicating your server across availability zones within a region.
  • Read Replicas: Allow you to asynchronously replicate data from your primary server to one or more read-only secondary servers. Useful for offloading read-heavy workloads and for disaster recovery.
  • Backup and Restore: Automated backups are taken regularly and retained for a configurable period. You can restore your server to any point within the retention period.
Note: Understanding the differences between Single Server and Flexible Server is crucial for choosing the right deployment option for your application. Flexible Server offers more control and advanced features.

Replication

Azure Database for MySQL supports:

  • MySQL Replication: Allows you to replicate data from a source MySQL database to one or more target databases. This is commonly used for read scaling and disaster recovery scenarios.
  • Logical Replication: Replicating specific databases or tables.
  • Physical Replication: Replicating the entire data directory (less common in managed services).

Monitoring and Management

Azure provides comprehensive tools for monitoring and managing your database server:

  • Azure Portal: The primary interface for managing your server, viewing metrics, and configuring settings.
  • Azure Monitor: Collects and analyzes telemetry data from your database server, providing insights into performance and health.
  • Query Performance Insight: Helps identify performance bottlenecks by showing you the most time-consuming queries.
Important: Regularly monitor your server's performance metrics, such as CPU utilization, memory usage, and IOPS, to ensure optimal performance and proactively address potential issues.