# Mysql monitoring using telegraf and influx db

**URL:** <https://community.grafana.com/t/mysql-monitoring-using-telegraf-and-influx-db/38432>\
**Category:** General\
**Created:** [October 26, 2020, 9:53am UTC](https://community.grafana.com/t/mysql-monitoring-using-telegraf-and-influx-db/38432 "2020-10-26T09:53:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![annonyme1](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@annonyme1](https://community.grafana.com/u/annonyme1)\
**Post date:** [October 26, 2020, 9:53am UTC](https://community.grafana.com/t/mysql-monitoring-using-telegraf-and-influx-db/38432/1 "2020-10-26T09:53:50Z")

</div>

hi everyone i’am using telegraf and influxdb to monitor mysql database in order to display thread connections,connected\_users,number of requests on my database  
so i used the [[inputs.mysql]] plugin  
-telegraf status working fine without error

- i tested telegraf with “telegraf --config /etc/telegraf/telegraf.conf --config /etc/telegraf/telegraf.conf --test” it shows data  
but while updloading a mysql dashboard on my Grafana i got that unknown error and all graph shows ‘‘no data’’:  
Templating  
Template variables could not be initialized: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘TAG VALUES WITH KEY=“server”’ at line 1

---

<div class="post-metadata">

**Author:** ![pooh](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@pooh](https://community.grafana.com/u/pooh)\
**Post date:** [October 26, 2020, 10:09am UTC](https://community.grafana.com/t/mysql-monitoring-using-telegraf-and-influx-db/38432/2 "2020-10-26T10:09:25Z")

</div>

Please show us the full query (copy and paste from the Query Inspector) which  
contains that string.

Antony

---

<div class="post-metadata">

**Author:** ![annonyme1](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@annonyme1](https://community.grafana.com/u/annonyme1)\
**Post date:** [October 26, 2020, 10:29am UTC](https://community.grafana.com/t/mysql-monitoring-using-telegraf-and-influx-db/38432/3 "2020-10-26T10:29:19Z")

</div>

How can i know which one of the querry shall i inspect? the error message doesn’t guide me to any querry !!  
how can i know where is his querry from 18 panels !  
and if that error was due to only one querry why all my 18 panels show no data !  
i just followed the tuto step by step

---

<div class="post-metadata">

**Author:** ![pooh](https://avatars.discourse-cdn.com/v4/letter/p/f05b48/32.png) [@pooh](https://community.grafana.com/u/pooh)\
**Post date:** [October 26, 2020, 11:00am UTC](https://community.grafana.com/t/mysql-monitoring-using-telegraf-and-influx-db/38432/4 "2020-10-26T11:00:06Z")

</div>

Okay, please point us at the tutorial you are referring to, so we can see what  
you might have done.

Antony.

---

<div class="post-metadata">

**Author:** ![annonyme1](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@annonyme1](https://community.grafana.com/u/annonyme1)\
**Post date:** [October 26, 2020, 11:31am UTC](https://community.grafana.com/t/mysql-monitoring-using-telegraf-and-influx-db/38432/5 "2020-10-26T11:31:45Z")

</div>

this one :

> **[MySQL Monitoring with Telegraf, InfluxDB & Grafana](https://labouardy.com/mysql-monitoring-telegraf-influxdb-grafana/)**
>
> This post will walk you through each step of creating interactive, real-time & dynamic dashboard to monitor your MySQL instances using Telegraf, InfluxDB & Grafana. Start by enabling the MySQL

  
this was the only tuto found about monitoring mysql using telegraf !
