MySQL: Query your databases directly

What it’s for: Application data including sales metrics, user counts, inventory, and any MySQL-stored data.

Compatible databases

MySQL, MariaDB, Percona Server, Amazon Aurora MySQL, Azure Database for MySQL, Google Cloud SQL for MySQL

Trade-offs

ProsCons
Familiar SQL syntaxNot optimized for time-series
Works with MySQL-compatible DBsQuery performance varies
Cloud database supportConnection management
No data migrationNeed read access

Best for

  • Application dashboards
  • Data already in MySQL or compatible databases
  • Combining technical and application metrics

Learning path

Connect your MySQL database step by step.

MySQL data source

Script

MySQL is everywhere. Web applications, WordPress sites, countless application systems all use it. The MySQL data source lets you query that data directly from Grafana using familiar SQL. Build dashboards showing sales trends, user signups, inventory levels, or any data living in MySQL.

And here’s a bonus: it also works with MySQL-compatible databases like MariaDB, Percona Server, and cloud offerings like Amazon Aurora, Azure Database for MySQL, and Google Cloud SQL. The data source is built into Grafana, so there’s nothing extra to install. Write your SQL query, and Grafana renders the results.

One practical tip: MySQL isn’t optimized for time-series workloads the way Prometheus or InfluxDB are. For complex queries or large datasets, connect to a read replica to avoid impacting your production database.

With those considerations in mind, MySQL is a great way to bring application data into your Grafana dashboards.