mysql no data,why?
Author: hope1234567hopeCreated Mar 21, 2025Updated Mar 21, 2025
my yaml is
variables: mysql_connection: mysql -u root -s --database mysql --skip-column-names sparklines:
- title: MySQL (random number example) pty: true init: $mysql_connection sample: select rand(); runcharts:
- title: thread moniot
rate-ms: 2000
items:
- label: bgthread
init: $mysql_connection
sample: SELECT COUNT(*)
FROM performance_schema.threads
WHERE TYPE = 'BACKGROUND'
AND NAME LIKE '%io%';
color: 178
- label: bgthread
init: $mysql_connection
sample: SELECT COUNT(*)
FROM performance_schema.threads
WHERE TYPE = 'BACKGROUND'
AND NAME LIKE '%io%';
But does not display the corresponding values; it shows "NAN" instead.
Source: sqshq/sampler