What is Azure Database for MySQL - Flexible Server?
APPLIES TO: Azure Database for MySQL - Flexible Server
This article provides an overview and introduction to the core concepts of the Flexible Server deployment model. For information on the appropriate deployment option for your workload, see Choose the right MySQL Server option in Azure.
Azure Database for MySQL - Flexible Server is a fully managed, production-ready relational database service in the Microsoft Cloud. It's based on the MySQL Community Edition (available under the GPLv2 license) database engine, versions 5.6 (retired), 5.7, and 8.0. The service gives you granular control and flexibility over database management functions and configuration settings. It's generally available in various Azure regions.
Azure Database for MySQL - Flexible Server delivers:
- Zone-redundant and same-zone high availability (HA).
- The ability to schedule maintenance windows.
- Data protection by using automatic backups and point-in-time restore for up to 35 days.
- Automated patching and maintenance for the underlying hardware, operating system, and database engine to help keep the service secure and up to date.
- Predictable performance, by using inclusive pay-as-you-go pricing.
- Elastic scaling within seconds.
- Cost optimization controls with the low-cost Burstable compute tier and the ability to stop and start the server.
- Enterprise-grade security, compliance, and privacy to help protect sensitive data at rest and in motion.
- Monitoring and automation to simplify management for large-scale deployments.
- Multiple ways to get support.
These capabilities require no extra cost and almost no administration. They allow you to focus on rapid app development and accelerate your time to market rather than allocating time and resources to managing virtual machines and infrastructure. In addition, you can continue to develop your application with the open-source tools and platform of your choice to deliver the speed and efficiency that your business demands without learning new skills.
Azure Database for MySQL - Flexible Server also supports reserved instances. If your production workloads have predictable compute capacity requirements, using reserved instances can help you save costs.
For the latest updates on Azure Database for MySQL - Flexible Server, refer to What's new in Azure Database for MySQL - Flexible Server.
Architecture overview
The Flexible Server deployment option offers three compute tiers have different compute and memory capacities to support your database workloads:
- The Burstable tier is best suited for low-cost development workloads and low-concurrency workloads that don't need full compute capacity continuously.
- The General Purpose and Business Critical tiers are better suited for production workloads that require high concurrency, scale, and predictable performance.
You can build your first app on a Burstable tier at a low cost and then adjust the scale to meet the needs of your solution. For details, see Azure Database for MySQL - Flexible Server service tiers.
When you use a Flexible Server architecture, you can opt for high availability within a single availability zone or across multiple availability zones. Flexible servers are best suited for:
- Ease of deployment, simplified scaling, and low database-management overhead for backups, high availability, security, and monitoring.
- Application developments that require a community version of MySQL with better control and customizations.
- Production workloads with same-zone or zone-redundant high availability, along with managed maintenance windows.
- A simplified development experience.
Free 12-month offer
With an Azure free account, you can use Azure Database for MySQL - Flexible Server for free for 12 months. The offer includes monthly limits of up to:
- 750 hours of use for a Burstable Standard_B1ms virtual machine. That's enough hours to run a database instance continuously each month.
- 32 GB of storage and 32 GB of backup storage.
You can use this offer to develop and deploy Azure database applications for flexible servers. To learn how to create and use Azure Database for MySQL - Flexible Server instances for free by using an Azure free account, refer to this tutorial.
High availability within and across availability zones
Azure Database for MySQL - Flexible Server allows configuring high availability with automatic failover. The high-availability solution helps ensure that committed data isn't lost due to failures, and it helps improve overall uptime for your application.
When you configure high availability, a flexible server automatically provisions and manages a standby replica. You're billed for the provisioned compute and storage for the primary and secondary replica.
There are two high-availability architectural models:
Zone-redundant high availability: This option offers complete isolation and requires you to configure infrastructure redundancy across multiple availability zones. It provides the highest level of availability against any infrastructure failure in an availability zone and where latency across availability zones is acceptable.
Zone-redundant HA is available in a subset of Azure regions that support multiple availability zones and zone-redundant premium file shares.
Same-zone high availability: This option offers infrastructure redundancy with lower network latency because both primary and standby servers are in the same availability zone. It provides high availability without requiring you to configure application redundancy across zones.
Same-zone HA is available in all Azure regions where you can create Azure Database for MySQL - Flexible Server instances.
For more information, see High-availability concepts in Azure Database for MySQL - Flexible Server.
Automated patching with a managed maintenance window
The service performs automated patching of the underlying hardware, operating system, and database engine. The patching includes security and software updates. For the MySQL engine, the planned maintenance release also includes minor version upgrades.
You can configure the patching schedule to be system managed or define your own custom schedule. During the maintenance schedule, the patch is applied, and the server might require a restart. With a custom schedule, you can make your patching cycle predictable and choose a maintenance window that has a minimum impact on the business. The service follows a monthly release schedule for continuous integration and release.
For more information, see Scheduled maintenance in Azure Database for MySQL - Flexible Server.
Automatic backups
The Azure Database for MySQL - Flexible Server service automatically creates server backups and stores them in user-configured locally redundant or geo-redundant storage. You can use backups to restore your server to any point in time within the backup retention period.
You can configure a retention period of 1 to 35 days. The default is 7 days. All backups are encrypted through AES 256-bit encryption.
For more information, see Backup and restore in Azure Database for MySQL - Flexible Server.
Network isolation
To connect to Azure Database for MySQL - Flexible Server, you have two networking options:
Private access (virtual network integration): You can deploy your Azure Database for MySQL - Flexible Server instance into an Azure virtual network. Resources in a virtual network can communicate through private IP addresses.
Choose virtual network integration if you want the following capabilities:
- Connect from Azure resources in the same virtual network to your Azure Database for MySQL - Flexible Server instance by using private IP addresses.
- Use a virtual private network (VPN) or Azure ExpressRoute to connect from non-Azure resources to your Azure Database for MySQL - Flexible Server instance.
- Avoid a public endpoint.
Public access (allowed IP addresses): You can deploy your Azure Database for MySQL - Flexible Server instance with a public endpoint. The public endpoint is a publicly resolvable DNS address. You choose a range of IP addresses to give permission to access your server. These types of permissions are called firewall rules.
For more information, see Connectivity and networking concepts for Azure Database for MySQL - Flexible Server.
Fast adjustments to performance and scale
You can build your first app on a small database for a few dollars a month and then seamlessly adjust the scale to meet the needs of your solution. The storage scaling is online and supports the storage autogrow feature of Azure Database for MySQL - Flexible Server.
With Azure Database for MySQL - Flexible Server, you can provision additional input/output operations per second (IOPS) above the complimentary IOPS limit independent of storage. By using this feature, you can increase or decrease the amount of provisioned IOPS based on your workload requirements at any time. Dynamic scalability enables your database to respond to rapidly changing resource requirements transparently. You pay for only the resources that you consume.
For more information, see Azure Database for MySQL - Flexible Server service tiers.
Ability to scale out your read workload with read replicas
MySQL is a popular database engine for running internet-scale web and mobile applications. Microsoft customers use it for online education, video streaming, digital payment solutions, e-commerce platforms, gaming services, news portals, and government and healthcare websites. These services are required to serve and scale as the web or mobile application's traffic increases.
The application is typically developed in Java or PHP and is either:
- Migrated to run on Azure virtual machine scale sets or Azure App Service
- Containerized to run on Azure Kubernetes Service (AKS)
Using a virtual machine scale set with App Service or AKS as the underlying infrastructure simplifies application scaling by instantaneously provisioning new virtual machines and replicating the stateless components of applications to cater to the requests. But often, the database ends up being a bottleneck as a centralized stateful component.
The read replica feature allows you to replicate data from an Azure Database for MySQL - Flexible Server instance to a read-only server. You can replicate from the source server to up to 10 replicas.
Replicas are updated asynchronously via the MySQL engine's native binary log (binlog) file position-based replication technology. You can use a load-balancer proxy solution like ProxySQL to seamlessly scale out your application workload to read replicas without any application refactoring cost.
For more information, see Read replicas in Azure Database for MySQL - Flexible Server.
Hybrid or multicloud data synchronization with data-in replication
You can use the data-in replication feature to synchronize data from an external MySQL server into Azure Database for MySQL - Flexible Server. The external server can be on-premises, in virtual machines, in Azure Database for MySQL - Single Server, or in a database service hosted by other cloud providers.
Data-in replication is position-based on the binlog file. The main scenarios to consider about using the feature are:
- Hybrid data synchronization
- Multicloud synchronization
- Minimal-downtime migration to Azure Database for MySQL - Flexible Server
For more information, see Replicate data into Azure Database for MySQL - Flexible Server.
On-demand server stop/start
With Azure Database for MySQL - Flexible Server, you can stop and start servers on demand to optimize costs. The compute tier billing stops immediately when the server is stopped. This functionality can help you save costs during development, testing, and time-bound predictable production workloads. The server remains in the stopped state for 30 days unless you restart it sooner.
For more information, see Server concepts in Azure Database for MySQL - Flexible Server.
Enterprise-grade security, compliance, and privacy
Azure Database for MySQL - Flexible Server uses the FIPS 140-2 validated cryptographic module for storage encryption of data at rest. Data (including backups) and temporary files created while you run queries are encrypted.
The service uses the AES 256-bit cipher included in Azure storage encryption, and the keys can be system managed (default). You can also use customer-managed keys stored in an Azure key vault or a managed hardware security module for data encryption at rest. For more information, see Data encryption with customer-managed keys for Azure Database for MySQL - Flexible Server.
Azure Database for MySQL - Flexible Server encrypts data in motion with Transport Layer Security (TLS) enforced by default. Azure Database for MySQL - Flexible Server supports encrypted connections that use TLS 1.2. All incoming connections that use TLS 1.0 and TLS 1.1 are denied. You can turn off TLS enforcement by setting the require_secure_transport
server parameter and then setting the minimum tls_version
value for your server. For more information, see Connect to Azure Database for MySQL - Flexible Server with encrypted connections.
Azure Database for MySQL - Flexible Server allows full private access to the servers through virtual network integration. Servers in a virtual network can be reached and connected only through private IP addresses. With virtual network integration, public access is denied and servers can't be reached through public endpoints. For more information, see Connectivity and networking concepts for Azure Database for MySQL - Flexible Server.
Monitoring and alerting
Azure Database for MySQL - Flexible Server has built-in performance monitoring and alerting features. All Azure metrics have a one-minute frequency. Each metric provides 30 days of history.
You can configure alerts on the metrics. Azure Database for MySQL - Flexible Server exposes host server metrics to monitor resource utilization and allows configuring slow query logs. By using these tools, you can quickly optimize your workloads and configure your server for the best performance.
In Azure Database for MySQL - Flexible Server, you can visualize slow query and audit log data by using Azure Monitor workbooks. With workbooks, you get a flexible canvas for analyzing data and creating rich visual reports within the Azure portal. Azure Database for MySQL - Flexible Server provides three workbook templates: Server Overview, Auditing, and Query Performance Insight.
The Query Performance Insight workbook helps you spend less time troubleshooting database performance by providing such information as:
- Top long-running queries and their trends.
- Query details: view the query text and the execution history with minimum, maximum, average, and standard deviation query time.
- Resource utilization (CPU, memory, and storage).
In addition, you can use community monitoring tools like Percona Monitoring and Management and integrate them with Azure Database for MySQL - Flexible Server.
For more information, see Monitor Azure Database for MySQL - Flexible Server.
Migration
Azure Database for MySQL - Flexible Server runs the community version of MySQL. This design allows full application compatibility and requires minimal refactoring costs to migrate existing applications developed on the MySQL engine to Azure Database for MySQL - Flexible Server. You can migrate to Azure Database for MySQL - Flexible Server by using the following options.
Offline migrations
Use Azure Database Migration Service when network bandwidth between the source and Azure is good (for example: a high-speed ExpressRoute connection). For step-by-step instructions, see Tutorial: Migrate MySQL to Azure Database for MySQL offline using DMS.
Use mydumper and myloader to use compression settings to efficiently move data over low-speed networks (such as the public internet). For step-by-step instructions, see Migrate large databases to Azure Database for MySQL using mydumper/myloader.
Online or minimal-downtime migrations
Use data-in replication with mydumper/myloader-consistent backup and restore for initial seeding. For step-by-step instructions, see Migrate Azure Database for MySQL - Single Server to Azure Database for MySQL - Flexible Server with open-source tools.
To migrate from Azure Database for MySQL - Single Server to Azure Database for MySQL - Flexible Server in five easy steps, refer to this blog.
For more information, see Select the right tools for migration to Azure Database for MySQL.
Azure regions
One advantage of running your workload in Azure is its global reach. Azure Database for MySQL - Flexible Server is currently available in the following Azure regions:
Region | Availability | Same-zone HA | Zone-redundant HA | Geo-redundant backup |
---|---|---|---|---|
Australia Central | ✔️ | ✔️ | ❌ | ❌ |
Australia East | ✔️ | ✔️ | ✔️ | ✔️ |
Australia Southeast | ✔️ | ✔️ | ❌ | ✔️ |
Brazil South | ✔️ | ✔️ | ✔️ | ✔️ |
Canada Central | ✔️ | ✔️ | ✔️ | ✔️ |
Canada East | ✔️ | ✔️ | ❌ | ✔️ |
Central India | ✔️ | ✔️ | ✔️ | ✔️ |
Central US | ✔️ | ✔️ | ❌ | ✔️ |
China East 2 | ✔️ | ✔️ | ❌ | ✔️ |
China East 3 | ✔️ | ✔️ | ❌ | ✔️ |
China North 2 | ✔️ | ✔️ | ❌ | ✔️ |
China North 3 | ✔️ | ✔️ | ✔️ | ✔️ |
East Asia (Hong Kong SAR) | ✔️ | ✔️ | ✔️ | ✔️ |
East US | ✔️ | ✔️ | ✔️ | ✔️ |
East US 2 | ✔️ | ✔️ | ✔️ | ✔️ |
France Central | ✔️ | ✔️ | ✔️ | ✔️ |
France South | ✔️ | ✔️ | ❌ | ✔️ |
Germany West Central | ✔️ | ✔️ | ✔️ | ✔️ |
Germany North | ✔️ | ✔️ | ❌ | ✔️ |
Israel Central | ✔️ | ✔️ | ✔️ | ❌ |
Italy North | ✔️ | ✔️ | ✔️ | ❌ |
Japan East | ✔️ | ✔️ | ✔️ | ✔️ |
Japan West | ✔️ | ✔️ | ❌ | ✔️ |
Jio India West | ✔️ | ✔️ | ❌ | ❌ |
Korea Central | ✔️ | ✔️ | ✔️ | ✔️ |
Korea South | ✔️ | ✔️ | ❌ | ✔️ |
North Central US | ✔️ | ✔️ | ❌ | ✔️ |
North Europe | ✔️ | ✔️ | ✔️ | ✔️ |
Norway East | ✔️ | ✔️ | ✔️ | ✔️ |
Norway West | ✔️ | ✔️ | ❌ | ❌ |
Poland Central | ✔️ | ✔️ | ❌ | ❌ |
Qatar Central | ✔️ | ✔️ | ✔️ | ❌ |
South Africa North | ✔️ | ✔️ | ✔️ | ✔️ |
South Africa West | ✔️ | ✔️ | ❌ | ✔️ |
South Central US | ✔️ | ✔️ | ✔️ | ✔️ |
South India | ✔️ | ✔️ | ❌ | ✔️ |
Southeast Asia | ✔️ | ✔️ | ✔️ | ✔️ |
Spain Central | ✔️ | ✔️ | ❌ | ✔️ |
Sweden Central | ✔️ | ✔️ | ✔️ | ❌ |
Switzerland North | ✔️ | ✔️ | ✔️ | ✔️ |
Switzerland West | ✔️ | ✔️ | ❌ | ✔️ |
Taiwan North | ✔️ | ✔️ | ❌ | ❌ |
Taiwan Northwest | ✔️ | ✔️ | ❌ | ❌ |
UAE Central | ✔️ | ✔️ | ❌ | ✔️ |
UAE North | ✔️ | ✔️ | ✔️ | ✔️ |
UK South | ✔️ | ✔️ | ✔️ | ✔️ |
UK West | ✔️ | ✔️ | ❌ | ✔️ |
USGov Virginia | ✔️ | ✔️ | ❌ | ❌ |
USGov Arizona | ✔️ | ✔️ | ❌ | ✔️ |
USGov Texas | ✔️ | ✔️ | ❌ | ✔️ |
West Central US | ✔️ | ✔️ | ❌ | ✔️ |
West Europe | ✔️ | ✔️ | ✔️ | ✔️ |
West US | ✔️ | ✔️ | ❌ | ✔️ |
West US 2 | ✔️ | ✔️ | ✔️ | ✔️ |
West US 3 | ✔️ | ✔️ | ✔️ | ✔️ |
Feedback and support
For any questions or suggestions that you might have about working with Azure Database for MySQL - Flexible Server, consider the following points of contact:
- To contact Azure support, file a request in the Azure portal.
- To provide feedback or to request new features, post an idea via community feedback.
Related content
- Create an Azure Database for MySQL - Flexible Server instance by using the Azure portal
- Create an Azure Database for MySQL - Flexible Server instance by using the Azure CLI
- Manage an Azure Database for MySQL - Flexible Server instance by using the Azure CLI
- Use Python to connect and query data in Azure Database for MySQL - Flexible Server
- Use PHP with Azure Database for MySQL - Flexible Server