Skip to content

MariaDB

PlotPress’s mariadb driver is wire-compatible with the mysql driver but pins MariaDB-specific defaults and recognizes MariaDB-only features.

appdb:
driver: mariadb
dsn: mariadb://reader:${MARIADB_PASSWORD}@mariadb:3306/app?tls=preferred&parseTime=true
allowed_users: [analysts]
timeout: 30s

The DSN format is identical to MySQL. Use driver: mariadb (rather than mysql) so PlotPress applies MariaDB-aware defaults — primarily around boolean type handling and the JSON pseudo-type (which is a LONGTEXT with a CHECK constraint in MariaDB, not a native type as in MySQL).

CREATE USER 'plotpress_reader'@'%' IDENTIFIED BY '...';
GRANT SELECT ON app.* TO 'plotpress_reader'@'%';
FLUSH PRIVILEGES;

Same shape as MySQL — CREATE VIEW and reference by name from the Plot block.

Plot.barY(data, { x: "month", y: "revenue" })

Same :name bind syntax as MySQL. PlotPress’s MariaDB driver also supports MariaDB’s RETURNING clause in non-read-only mode (rarely needed for dashboards).

  • JSON columns are returned as strings; parse them in the Plot block (d3.json or JSON.parse).
  • SQL_MODE — set STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO on the server side for predictable types.
  • Galera clusters — PlotPress’s pool tolerates a single endpoint; for multi-node reads, front the cluster with HAProxy or MaxScale and point the DSN at the proxy.
  • Versions older than 10.5 lack JSON path support PlotPress assumes for its information_schema probes; prefer 10.6+.