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: 30sThe 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).
Authentication
Section titled “Authentication”CREATE USER 'plotpress_reader'@'%' IDENTIFIED BY '...';GRANT SELECT ON app.* TO 'plotpress_reader'@'%';FLUSH PRIVILEGES;Views (primary path)
Section titled “Views (primary path)”Same shape as MySQL — CREATE VIEW and reference by name from the Plot block.
Plot.barY(data, { x: "month", y: "revenue" })Fallback: queries/*.sql
Section titled “Fallback: queries/*.sql”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).
Caveats
Section titled “Caveats”JSONcolumns are returned as strings; parse them in the Plot block (d3.jsonorJSON.parse).SQL_MODE— setSTRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZEROon 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_schemaprobes; prefer 10.6+.