Describe the bug
Getting this error when querying the ndbinfo.resources table of MySQL NDB Cluster:
time=2025-10-11T19:28:36.954Z level=ERROR source=promhttp.go:51 msg="Error gathering metrics" error="[from Gatherer #1] [target=ndbinfo_sql2,collector=ndbinfo_stats,query=TRANSACTION_MEMORY] Error 1267 (HY000): Illegal mix of collations (utf8mb4_0900_ai_ci,COERCIBLE) and (utf8mb4_general_ci,COERCIBLE) for operation '='"
The query is:
select node_id, resource_name, reserved, used, max, spare from ndbinfo.resources where resource_name = 'TRANSACTION_MEMORY'
To Reproduce
Steps to reproduce the behavior:
- Create a metric with that query
- Re-start sql_exporter
- See error
Expected behavior
The error to not occur and the data get is exported.