MariaDB
MariaDB 10.11, 11.4, 11.8 and 12.3, the LTS releases, each tested on every build.
trek init --provider mariadb
trek add create-product
trek deploy
trek.yamlprovider: mariadb
defaultEnvironment: local
environments:
local:
host: localhost
port: 3306
database: shop # trek deploys here and keeps its journal here (trek_* tables)
authentication: password
user: root
password: ${env:TREK_LOCAL_PASSWORD}
tls:
mode: optional
MariaDB began as a fork of MySQL and still shares its protocol, its mysql-client script conventions and most of its SQL, so trek's MariaDB provider is the MySQL provider in MariaDB mode: everything on the MySQL page applies, with the differences below. The plan, hash certification, revert from stored scripts, environments, variables, repeatables, bundles, verify, diff-schema, generated changes and trek convert work as on the other databases. Imports from other tools are not available for MariaDB yet.
Differences from MySQL
| Topic | MariaDB |
|---|---|
| Transactions | As in MySQL, DDL commits as it runs: changes run without a transaction, and a change that fails part-way keeps what already ran. Keep changes small and give each a verify script. |
| Scripts | Split like the mariadb client (the same as mysql): statements end at ;, stored program bodies go between DELIMITER lines. MariaDB's own syntax (CREATE OR REPLACE for procedures, functions and triggers, sequences, RETURNING, system-versioned tables) runs as written. |
| Fingerprint | Covers what it covers on MySQL, plus sequences. MariaDB has no functional indexes; ignored indexes count as invisible ones do on MySQL. |
| Sign-in | Passwords. Azure Database for MariaDB has been retired, so there is no Entra sign-in. |
| Converting | MariaDB converts to and from every other provider, MySQL included; see Converting: MariaDB. |
Versions and services
Every build runs the provider's tests against MariaDB 10.11, 11.4, 11.8 and 12.3 (the official Docker images), the long-term-support releases that are still supported; trek doctor flags older and short-term releases. Amazon RDS for MariaDB runs standard MariaDB and is expected to work, but has not been tested. trek connects with MySqlConnector: connectionProperties takes any of its connection-string keywords, and tls.mode maps to its SslMode.