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

Good to know

  • Query language: SQL
  • Built into Grafana, with nothing extra to install
  • A general-purpose database, not a time-series store like Prometheus or InfluxDB

Best for

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

Tip: MySQL is a general-purpose database rather than a time-series store like Prometheus or InfluxDB. As a general practice, point Grafana at a read replica for complex queries or large datasets so they don’t impact your production database.


Set it up

Open this learning path in your Grafana Cloud stack for a fully interactive experience, or read through it to understand the process first.

Learning path

Connect to a MySQL data source

Welcome to the Grafana learning path that provides the best practice for configuring a MySQL data source plugin.

11 min
Beginner
Docs & blog posts

Open in Grafana Cloud

Complete this learning path directly in your Grafana Cloud stack with an interactive learning experience.

Script

MySQL is widely used. Web applications, WordPress sites, and many application systems rely on 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 is a general-purpose database rather than a time-series store like Prometheus or InfluxDB, so a purpose-built time-series database handles very large or high-frequency datasets better. As a general practice, point Grafana at a read replica for heavy dashboard queries to avoid impacting your production database.

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