grafana/docs/sources/datasources/mysql/_index.md

69 lines
2.6 KiB
Markdown
Raw Normal View History

---
aliases:
- ../data-sources/mysql/
- ../features/datasources/mysql/
MySQL documentation major improvements (#107690) * added keywords and fixed description * Update (dateColumn) description Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * Mount docs from the current repository Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Clean up variables Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Improve timeFilter and timeGroup macro description Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * Fix timefilter macro example formatting Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * Fix time macro example formatting Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * Remove extra spaces from timefilter macro example Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * Introduce new table and Add examples for time, timeFilter and timeGroup Macros Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * Improve existing examples of timeGroupAlias Macro Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * Remove data frame description Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * fixed the homepage with valid links Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> * Add Table Panel results for Macros Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * fixed and define the configuration part for grafana mysql user Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> * fixed port typo Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> * remove the sqlDatasourceDatabaseSelection based https://github.com/grafana/grafana/issues/105232 Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> * added annotation single tag example Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> * Change format type Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * fix minor typos and run prettier Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> * Address Macros specific changes Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * Revert column name and replace URL with version substitution Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * re-added the text for the feature flag Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> * revert back the changes for the grafana mysql usage Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> * fixed links as per writers toolkit guide * run prettier Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> * Update docs/sources/datasources/mysql/query-editor/_index.md thanks Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com> --------- Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> Signed-off-by: Jack Baldry <jack.baldry@grafana.com> Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> Co-authored-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> Co-authored-by: Jack Baldry <jack.baldry@grafana.com> Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2025-07-30 22:03:44 +08:00
description: Introduction to the MySQL data source in Grafana
keywords:
- grafana
- mysql
MySQL documentation major improvements (#107690) * added keywords and fixed description * Update (dateColumn) description Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * Mount docs from the current repository Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Clean up variables Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Improve timeFilter and timeGroup macro description Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * Fix timefilter macro example formatting Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * Fix time macro example formatting Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * Remove extra spaces from timefilter macro example Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * Introduce new table and Add examples for time, timeFilter and timeGroup Macros Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * Improve existing examples of timeGroupAlias Macro Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * Remove data frame description Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * fixed the homepage with valid links Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> * Add Table Panel results for Macros Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * fixed and define the configuration part for grafana mysql user Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> * fixed port typo Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> * remove the sqlDatasourceDatabaseSelection based https://github.com/grafana/grafana/issues/105232 Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> * added annotation single tag example Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> * Change format type Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * fix minor typos and run prettier Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> * Address Macros specific changes Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * Revert column name and replace URL with version substitution Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * re-added the text for the feature flag Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> * revert back the changes for the grafana mysql usage Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> * fixed links as per writers toolkit guide * run prettier Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> * Update docs/sources/datasources/mysql/query-editor/_index.md thanks Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com> --------- Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> Signed-off-by: Jack Baldry <jack.baldry@grafana.com> Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> Co-authored-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> Co-authored-by: Jack Baldry <jack.baldry@grafana.com> Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2025-07-30 22:03:44 +08:00
- data source
- guide
Explicitly set all front matter labels in the source files (#71548) * Set every page to have defaults of 'Enterprise' and 'Open source' labels Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Set administration pages to have of 'Cloud', 'Enterprise', and 'Open source' labels Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Set administration/enterprise-licensing pages to have 'Enterprise' labels Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Set administration/organization-management pages to have 'Enterprise' and 'Open source' labels Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Set administration/provisioning pages to have 'Enterprise' and 'Open source' labels Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Set administration/recorded-queries pages to have labels cloud,enterprise * Set administration/roles-and-permissions/access-control pages to have labels cloud,enterprise Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Set administration/stats-and-license pages to have labels cloud,enterprise * Set alerting pages to have labels cloud,enterprise,oss * Set breaking-changes pages to have labels cloud,enterprise,oss * Set dashboards pages to have labels cloud,enterprise,oss * Set datasources pages to have labels cloud,enterprise,oss * Set explore pages to have labels cloud,enterprise,oss * Set fundamentals pages to have labels cloud,enterprise,oss * Set introduction/grafana-cloud pages to have labels cloud Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Fix introduction pages products Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Set panels-visualizations pages to have labels cloud,enterprise,oss * Set release-notes pages to have labels cloud,enterprise,oss * Set search pages to have labels cloud,enterprise,oss * Set setup-grafana/configure-security/audit-grafana pages to have labels cloud,enterprise Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Set setup-grafana/configure-security/configure-authentication pages to have labels cloud,enterprise,oss * Set setup-grafana/configure-security/configure-authentication/enhanced-ldap pages to have labels cloud,enterprise * Set setup-grafana/configure-security/configure-authentication/saml pages to have labels cloud,enterprise * Set setup-grafana/configure-security/configure-database-encryption/encrypt-secrets-using-hashicorp-key-vault pages to have labels cloud,enterprise * Set setup-grafana/configure-security/configure-request-security pages to have labels cloud,enterprise,oss Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Set setup-grafana/configure-security/configure-team-sync pages to have labels cloud,enterprise Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Set setup-grafana/configure-security/export-logs pages to have labels cloud,enterprise Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Set troubleshooting pages to have labels cloud,enterprise,oss * Set whatsnew pages to have labels cloud,enterprise,oss * Apply updated labels from review Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com> --------- Signed-off-by: Jack Baldry <jack.baldry@grafana.com> Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com> Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
2023-07-18 16:10:12 +08:00
labels:
products:
- cloud
- enterprise
- oss
Docs: Refactor data sources content (#57573) * Docs: Revise data source index * Docs: Consolidate data source administration docs * Docs: Revise panels docs related to data sources * Docs: Revise Alertmanager data source * Docs: Reorganize AWS CloudWatch data source docs * Docs: Reorganize Azure Monitor data source docs * Docs: Move azuremonitor to azure-monitor * Docs: Revise Elasticsearch docs * Docs: Move Elasticsearch index into bundle * Docs: Revise GCM docs * Docs: Revise Graphite docs * Docs: Move Graphite index into bundle * Docs: Revise InfluxDB docs * Docs: Revise Jaeger docs * Docs: Move Jaeger index into bundle * Docs: Revise Loki docs * Docs: Move Loki index into bundle * Docs: Revise MS SQL docs * Docs: Move MS SQL index into bundle * Docs: Revise Prometheus docs * Docs: Move Prometheus index into bundle * Docs: Revise Tempo docs * Docs: Move Tempo index into bundle * Docs: Revise TestData DB docs * Docs: Move TestData DB index into bundle * Docs: Revise Zipkin docs * Docs: Move Zipkin index into bundle * Docs: Move other data sources' index pages into bundles * Docs: Revise frontmatter * Fixing hugo markdown errors * Docs: Add query editor and template var sections to overview doc * Docs: Remove CTAs across data source docs * Docs: Remove CTA * Docs: Remove CTA * Docs: Fix links, images, typos, and usage consistency. * Docs: Fix typos * Docs: Fix CI issues * Update docs/sources/datasources/_index.md Co-authored-by: Torkel Ödegaard <torkel@grafana.com> * Update docs/sources/datasources/_index.md Co-authored-by: Torkel Ödegaard <torkel@grafana.com> * Docs: Fix query editor links * Update docs/sources/panels-visualizations/_index.md Co-authored-by: Torkel Ödegaard <torkel@grafana.com> * Update docs/sources/panels-visualizations/_index.md Co-authored-by: Torkel Ödegaard <torkel@grafana.com> * Docs: Rebundle child pages per writers' toolkit * Docs: Fix prettier for CI * Docs: Fix relrefs from outside data sources docs * Docs: Fix broken relrefs within datasources * Docs: Fix relrefs to data sources docs * Fixed some more refs Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-11-01 23:22:06 +08:00
menuTitle: MySQL
title: MySQL data source
weight: 1000
refs:
annotate-visualizations:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/annotate-visualizations/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/visualizations/dashboards/build-dashboards/annotate-visualizations/
configure-mysql-data-source:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/mysql/configuration/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/mysql/configuration/
mysql-query-editor:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/mysql/query-editor/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/mysql/query-editor/
alerting:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/
transformations:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/query-transform-data/transform-data/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/visualizations/panels-visualizations/query-transform-data/transform-data/
---
2017-05-11 18:59:49 +08:00
Docs: Refactor data sources content (#57573) * Docs: Revise data source index * Docs: Consolidate data source administration docs * Docs: Revise panels docs related to data sources * Docs: Revise Alertmanager data source * Docs: Reorganize AWS CloudWatch data source docs * Docs: Reorganize Azure Monitor data source docs * Docs: Move azuremonitor to azure-monitor * Docs: Revise Elasticsearch docs * Docs: Move Elasticsearch index into bundle * Docs: Revise GCM docs * Docs: Revise Graphite docs * Docs: Move Graphite index into bundle * Docs: Revise InfluxDB docs * Docs: Revise Jaeger docs * Docs: Move Jaeger index into bundle * Docs: Revise Loki docs * Docs: Move Loki index into bundle * Docs: Revise MS SQL docs * Docs: Move MS SQL index into bundle * Docs: Revise Prometheus docs * Docs: Move Prometheus index into bundle * Docs: Revise Tempo docs * Docs: Move Tempo index into bundle * Docs: Revise TestData DB docs * Docs: Move TestData DB index into bundle * Docs: Revise Zipkin docs * Docs: Move Zipkin index into bundle * Docs: Move other data sources' index pages into bundles * Docs: Revise frontmatter * Fixing hugo markdown errors * Docs: Add query editor and template var sections to overview doc * Docs: Remove CTAs across data source docs * Docs: Remove CTA * Docs: Remove CTA * Docs: Fix links, images, typos, and usage consistency. * Docs: Fix typos * Docs: Fix CI issues * Update docs/sources/datasources/_index.md Co-authored-by: Torkel Ödegaard <torkel@grafana.com> * Update docs/sources/datasources/_index.md Co-authored-by: Torkel Ödegaard <torkel@grafana.com> * Docs: Fix query editor links * Update docs/sources/panels-visualizations/_index.md Co-authored-by: Torkel Ödegaard <torkel@grafana.com> * Update docs/sources/panels-visualizations/_index.md Co-authored-by: Torkel Ödegaard <torkel@grafana.com> * Docs: Rebundle child pages per writers' toolkit * Docs: Fix prettier for CI * Docs: Fix relrefs from outside data sources docs * Docs: Fix broken relrefs within datasources * Docs: Fix relrefs to data sources docs * Fixed some more refs Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-11-01 23:22:06 +08:00
# MySQL data source
2017-05-11 18:59:49 +08:00
MySQL documentation major improvements (#107690) * added keywords and fixed description * Update (dateColumn) description Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * Mount docs from the current repository Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Clean up variables Signed-off-by: Jack Baldry <jack.baldry@grafana.com> * Improve timeFilter and timeGroup macro description Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * Fix timefilter macro example formatting Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * Fix time macro example formatting Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * Remove extra spaces from timefilter macro example Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * Introduce new table and Add examples for time, timeFilter and timeGroup Macros Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * Improve existing examples of timeGroupAlias Macro Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * Remove data frame description Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * fixed the homepage with valid links Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> * Add Table Panel results for Macros Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * fixed and define the configuration part for grafana mysql user Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> * fixed port typo Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> * remove the sqlDatasourceDatabaseSelection based https://github.com/grafana/grafana/issues/105232 Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> * added annotation single tag example Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> * Change format type Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * fix minor typos and run prettier Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> * Address Macros specific changes Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * Revert column name and replace URL with version substitution Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> * re-added the text for the feature flag Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> * revert back the changes for the grafana mysql usage Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> * fixed links as per writers toolkit guide * run prettier Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> * Update docs/sources/datasources/mysql/query-editor/_index.md thanks Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com> --------- Signed-off-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> Signed-off-by: Jack Baldry <jack.baldry@grafana.com> Signed-off-by: Usman Ahmad <usman.ahmad@grafana.com> Co-authored-by: Sheikh-Abubaker <sheikhabubaker761@gmail.com> Co-authored-by: Jack Baldry <jack.baldry@grafana.com> Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2025-07-30 22:03:44 +08:00
Grafana ships with a built-in MySQL data source plugin that allows you to query and visualize data from a MySQL-compatible database like [MariaDB](https://mariadb.org/) or [Percona Server](https://www.percona.com/). You don't need to install a plugin in order to add the MySQL data source to your Grafana instance.
Grafana offers several configuration options for this data source as well as a visual and code-based query editor.
2018-10-30 22:45:39 +08:00
## Get started with the MySQL data source
2018-10-30 22:45:39 +08:00
The following documents will help you get started with the MySQL data source in Grafana:
2017-05-11 18:59:49 +08:00
- [Configure the MySQL data source](ref:configure-mysql-data-source)
- [MySQL query editor](ref:mysql-query-editor)
2017-05-11 18:59:49 +08:00
Once you have configured the data source you can:
2017-05-11 18:59:49 +08:00
- Add [annotations](ref:annotate-visualizations)
- Set up [alerting](ref:alerting)
- Add [transformations](ref:transformations)
2017-05-11 18:59:49 +08:00
View a MySQL overview on Grafana Play:
2017-05-11 18:59:49 +08:00
{{< docs/play title="MySQL Overview" url="https://play.grafana.org/d/edyh1ib7db6rkb/mysql-overview" >}}