docs/sources/datasources/mysql/_index.md
The MySQL data source lets you query and visualize data from MySQL and MySQL-compatible databases like MariaDB or Percona Server. Use it to create dashboards, explore SQL data, and monitor MySQL-based workloads in real time.
The data source ships with Grafana out of the box. It's preinstalled in both Grafana OSS and Grafana Enterprise, so there's nothing for you to install. Starting with Grafana 13.2, it's packaged as a standalone plugin that updates independently of Grafana releases. Refer to Plugin updates for details.
Watch the following video to learn more about using the Grafana MySQL data source plugin: {{< youtube id="p_RDHfHS-P8">}}
{{< docs/play title="MySQL Overview" url="https://play.grafana.org/d/edyh1ib7db6rkb/mysql-overview" >}}
This data source supports the following MySQL-compatible databases:
Grafana recommends using the latest available version for your database for optimal compatibility.
The MySQL data source supports:
The following documentation helps you get started with the MySQL data source:
Starting with Grafana 13.2, the MySQL data source is a standalone plugin, preinstalled in both Grafana OSS and Grafana Enterprise. This enables more frequent updates independent of Grafana releases. Grafana automatically checks the plugin catalog and installs the latest version on each server restart.
To adjust this behavior:
preinstall_auto_update to false in your configuration file.The standalone plugin requires Grafana 12.3.0 or later. The MySQL data source bundled with Grafana 13.1 and earlier continues to work as before. These versions are unaffected by the change.
Users running Grafana 12.3.x through 13.1.x can install the standalone plugin from the plugin catalog if they want the latest features before upgrading to Grafana 13.2. To use the standalone plugin with Grafana 12.3.x through 13.1.x, add the following to your configuration file:
[plugin.mysql]
as_external = true
[plugins]
; Install the latest version on startup:
preinstall_sync = mysql
; Or install a specific version:
; preinstall_sync = mysql@<version>
After configuring the MySQL data source, you can also:
If you want to monitor your MySQL server's performance metrics (connections, queries, replication, and more), Grafana provides pre-configured dashboards through the MySQL integration:
The MySQL integration uses the Prometheus MySQL Exporter to collect server metrics and includes 15 pre-configured alert rules.
To use these dashboards:
For more MySQL dashboards, browse the Grafana dashboard catalog.
{{< admonition type="note" >}} The MySQL integration monitors your MySQL server using Prometheus metrics. The MySQL data source documented here queries data stored in MySQL tables. These are complementary features for different use cases. {{< /admonition >}}