DB for MySQL


The presented resiliency recommendations in this guidance include DB for MySQL and associated resources and settings.

Summary of Recommendations

Recommendations Details

MYSQL-1 - Enable HA with zone redundancy

Category: Availability

Impact: High

Guidance

Enable HA with zone redundancy on flexible server instances. Zone redundant high availability deploys a standby replica in a different zone with automatic failover capability.

Resources

Resource Graph Query

// Azure Resource Graph Query
// Find Database for MySQL instances that are not zone redundant
resources
| where type == "microsoft.dbformysql/flexibleservers"
| where properties.highAvailability.mode != "ZoneRedundant"
| project recommendationId = "psql-1", name, id, tags, param1 = "ZoneRedundant: False"



MYSQL-2 - Enable custom maintenance schedule

Category: System Efficiency

Impact: High

Guidance

Use custom maintenance schedule on flexible server instances to select a preferred time for service updates to be applied.

Resources

Resource Graph Query

// Azure Resource Graph Query
// Find Database for MySQL instances that do not have a custom maintenance window
resources
| where type == "microsoft.dbformysql/flexibleservers"
| where properties.maintenanceWindow.customWindow != "Enabled"
| project recommendationId = "psql-2", name, id, tags, param1 = strcat("customWindow:", properties['maintenanceWindow']['customWindow'])