Atatus Database Monitoring offers comprehensive monitoring for your Azure Database for MySQL instances, providing valuable insights into query performance, query samples, execution plans, connection details, system statistics, and InnoDB storage engine telemetry. The Atatus Infra Agent runs on a separate host (typically an Azure VM in the same virtual network) and connects to your Azure Database for MySQL endpoint over TLS.

Before You Begin

Query Activity and Wait Event collection are unavailable on Azure Database for MySQL Flexible Server.

Configure MySQL Performance Schema Settings

In the Azure Portal, open your MySQL instance and edit its Server parameters: Azure Database for MySQL enables performance schema consumers (events_statements_*) by default, so no further consumer configuration is needed. Restart the instance after enabling performance_schema.

Setup Database Access for the Agent

Create the atatus user and grant basic permissions:
Create the following schema:
Procedure to Enable Events Statements Consumers:
Create the EXPLAIN_STATEMENT procedure to enable the agent to collect explain plans:
Additionally, create this procedure in every schema from which you want to collect explain plans. Replace YOUR_SCHEMA:
Grant access for InnoDB index metrics:
[Optional] To collect database configuration and schema details:

Configure Atatus Infrastructure Agent

  1. Install the Atatus Infrastructure agent on a host (typically an Azure VM) that can reach your MySQL endpoint.
  2. Copy the MySQL example configuration file:
  3. Update the MySQL configuration file at /etc/atatus-infra-agent/conf.d/mysql.d/mysql.yml:
    Replace <AZURE_INSTANCE_ENDPOINT> with your Azure MySQL FQDN, e.g. example-primary.mysql.database.azure.com.
  4. Restart the Atatus Infra Agent:
Azure Single Server typically requires the username in the form atatus@<servername> in the connection string. Adjust the username: value accordingly if your instance enforces that format.

Monitoring Multiple Instances (Optional)

To monitor a primary and replica:

Collecting Schemas (Optional)

Collecting Custom Metrics (Optional)