Grafana MySQL datasource and compatibility checks¶
Start with the shared setup and dataset. The versioned observations below use the MatrixOne build identified in the overview.
Configure the native datasource¶
Install Grafana and use the built-in MySQL datasource. The tested combination was Grafana 13.2.3 with MySQL plugin 13.1.2.
Add a MySQL datasource with server address
MO_HOST:6001, databasebi_tutorial, and the read-only username/password. Choose TLS settings matching your deployment.Select Save & test. If health fails, stop and resolve connection compatibility before building panels.
If health succeeds on your versions, create a table panel in SQL code mode and run the shared category query. Check the two exact net amounts before selecting a visualization.
For a time-series panel, a sorted
timecolumn and numeric value are required. Use this query and select a dashboard range covering January 1–4, 2026:
SELECT CAST(DATE(ordered_at) AS DATETIME) AS time,
SUM(net_amount) AS net_amount
FROM bi_tutorial.order_metrics
GROUP BY DATE(ordered_at) ORDER BY time;
The expected values are 85, 245 and 80 for the three days. A production panel normally adds $__timeFilter(ordered_at) before grouping; that macro is expanded by Grafana, not understood by a raw MatrixOne SQL client. Confirm the expanded SQL and the dashboard time zone before comparing date buckets.
Known connection limitation¶
On the tested build, native datasource health and query requests failed with invalid connection; saving a ten-panel dashboard did not establish successful query execution. The same Grafana instance worked against MySQL 8.0.30.
Independent Go-driver controls connected to MatrixOne with default/general collation, but explicit utf8mb4_unicode_ci failed. MatrixOne rejected SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci, while utf8mb4_general_ci passed. This pattern is consistent with the plugin’s collation-related limitation; see #29206.
No supported collation override was established for the tested native Grafana datasource. Do not assume an arbitrary JSON collation key changes its driver. The panel SQL above is a conditional construction example for a combination that passes datasource health, not a claim that the blocked tested combination rendered it successfully.