# Problem with MySQL datasource query

**URL:** <https://community.grafana.com/t/problem-with-mysql-datasource-query/8871>\
**Category:** Grafana\
**Created:** [July 17, 2018, 8:18pm UTC](https://community.grafana.com/t/problem-with-mysql-datasource-query/8871 "2018-07-17T20:18:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kernel](https://avatars.discourse-cdn.com/v4/letter/k/7ea924/32.png) [@kernel](https://community.grafana.com/u/kernel)\
**Post date:** [July 17, 2018, 8:18pm UTC](https://community.grafana.com/t/problem-with-mysql-datasource-query/8871/1 "2018-07-17T20:18:03Z")

</div>

I’m trying to plot a simple graph of the number of ‘max’ connections in a MySQL instance, from the ‘information\_schema’ database using the MySQL datasource. The following query works on the MySQL command line, but if I try to make a “Time Series” it gives me a “blank” graph, not sure why. Any ideas?

SELECT UNIX\_TIMESTAMP() as time, variable\_value as value FROM global\_status WHERE variable\_name = ‘MAX\_USED\_CONNECTIONS’ order by time asc

Output of query in MySQL:  
mysql\> SELECT UNIX\_TIMESTAMP() as time, variable\_value as value FROM global\_status WHERE variable\_name = ‘MAX\_USED\_CONNECTIONS’ order by time asc;  
±-----------±------+  
| time | value |  
±-----------±------+  
| 1531844841 | 911 |  
±-----------±------+  
1 row in set (0.00 sec)

---

<div class="post-metadata">

**Author:** ![fredrick867](https://avatars.discourse-cdn.com/v4/letter/f/848f3c/32.png) [@fredrick867](https://community.grafana.com/u/fredrick867)\
**Post date:** [July 20, 2018, 8:35pm UTC](https://community.grafana.com/t/problem-with-mysql-datasource-query/8871/2 "2018-07-20T20:35:46Z")

</div>

I ran into this yesterday. I thought, Grafana would request the sql at given intervals, store the results, and then graph the result of that information. Instead, it just shows what is returned for that simple query. So, I only go a dot on the far righthand side.
