Exponential Databases
This page is the overview of every database Exponential 6.0.x works with: which ones hold a site, which ones are tested and how, what each one needs, how to choose and install one, how clusters and replicas use them, which other products speak their protocols, which databases are data table connections and import sources only, the known gaps, and how to back up, upgrade and move a site from one database to another. It is written for administrators who run a site and for developers who write code that has to work on every database.
Every statement here was checked against the kernel's code (the driver classes in lib/ezdb/classes/, the aliases of
settings/site.ini, the installers) and against the continuous integration in .github/workflows/ of the main
branch (6.0.15) on 30 November 2026. Where the code or the CI does not back a claim, this page does not make it. The
detail of every database is on Database support and on each driver's own page, linked
from the tables below.
Contents
- In short
- What the status words mean
- Every engine at a glance
- How to choose
- Install and set up
- Settings in site.ini
- Clusters, DFS and read replicas
- Wire-protocol compatible databases
- Data table connections and import sources
- Tested in CI
- Limits and known gaps
- Backups, upgrades and moving between engines
- How this page is kept true
- Related pages
In short
- SQLite 3 is the default. It needs no database server: the whole site is one file below
var/storage/sqlite3/. The setup wizard preselects it andexp:installuses it when no--dbis given. - PostgreSQL is the recommended database server (13 to 19), tested in CI on every push.
- The official order of the supported databases for Exponential 6.0.x: 1. SQLite 3 · 2. PostgreSQL · 3. MongoDB · 4. MariaDB · 5. Oracle · 6. MySQL · 7. Microsoft SQL Server and Azure SQL.
- 6.0.15 adds more site databases on kernel drivers of their own, each tested in CI against a live server: Firebird, DuckDB, libSQL, IBM Db2, IBM Informix, SAP HANA, MonetDB, a generic ODBC driver, and products that speak the MySQL, PostgreSQL or MongoDB protocol (TiDB, Vitess, SingleStore, CockroachDB, YugabyteDB and more).
- Some databases hold no site but are data table connections or import sources: ClickHouse, Cassandra and ScyllaDB, Couchbase, CouchDB, Microsoft Access, the analytic databases of the MySQL and PostgreSQL protocols, and key-value and document stores such as Redis and Valkey.
- Several web servers can share one site on PostgreSQL, MongoDB, MariaDB, MySQL, Oracle, SQL Server and the protocol families built on them, with a DFS cluster for the files; a SQLite site runs on several nodes with LiteFS.
- xne, the upgrade tool, backs up, upgrades and rolls back sites on SQLite, PostgreSQL, MariaDB and MySQL, MongoDB and Oracle. It refuses every other database until it has a verified backup for it.
What the status words mean
| Status | Meaning |
|---|---|
| Default | What the installers choose when you choose nothing: SQLite 3. |
| Recommended | The database server the project recommends for new sites: PostgreSQL. |
| Supported | A driver in the kernel (or, for Oracle, in the ezoracle extension that composer.json requires), a path in the installers, and CI that runs it against a live server: driver tests, live tests, a whole site installed, or the DFS backend. |
| Experimental | A driver and an installer path exist and pass their tests without a server, but CI does not run it against a live server: a cloud service that cannot run in CI, or a product measured only by hand. Use it to try, not for production. |
| Data tables, import | Not a site database: a data table connection can make, read and write tables on it, or an exp:<name>:import command copies its data into a site. |
"Supported" says what CI proves, not what a vendor promises. A product that speaks the protocol of a supported database is supported only where its own leg runs in CI; otherwise it is experimental, even when it is expected to work.
Every engine at a glance
The column CI names the server versions the workflows run (see Tested in CI for what they run on each). DFS says whether the database can hold the file metadata of a DFS cluster, so that several web servers share one site.
The seven supported databases
| Database | Status | DatabaseImplementation | PHP extension | CI | exp:install --db= | DFS |
|---|---|---|---|---|---|---|
| SQLite 3 | default | sqlite3 | sqlite3 | the library of the CI images, PHP 8.1 to 8.5; a site on Windows Server 2022 and 2025 | sqlite (the default) | one machine only |
| PostgreSQL | recommended | ezpostgresql (pgsql, postgresql) | pgsql | 13, 15, 18 and 19 (database tests); 13 to 19 (DFS backend); 17 (site over ODBC, container image) | pgsql | yes |
| MongoDB | supported | mongodb | mongodb and the library mongodb/mongodb | 7 (migration tests), 8.0 (DFS backend), 5.0 (a whole site, when the MongoDB protocol code changes) | mongodb | yes |
| MariaDB | supported | ezmysqli (mysqli) | mysqli | 11.4 (a whole site over ODBC), 11.8 (container image, nightly); the native mysqli suite runs on MySQL 8.0 | mariadb | yes |
| Oracle | supported, through ezoracle | ezoracle (oracle) | oci8 | Oracle Free 23 (the DFS backend only) | oracle | yes |
| MySQL | supported | ezmysqli (mysqli, mysql) | mysqli | 8.0 (database tests, DFS backend) | mysql | yes |
| Microsoft SQL Server and Azure SQL | supported (new in 6.0.15) | sqlserver (mssql, sqlsrv) | sqlsrv, pdo_sqlsrv, pdo_odbc or pdo_dblib | 2017, 2019, 2022 and 2025; LocalDB on Windows. Azure SQL runs on the same driver; the service is not in CI | sqlserver | yes |
More site databases
All of them are new in 6.0.15. "One web server" means there is no DFS backend on the database yet.
| Database | Status | DatabaseImplementation | PHP extension | CI | exp:install --db= | DFS |
|---|---|---|---|---|---|---|
| Firebird | supported, one web server | firebird (fb) | pdo_firebird of PHP 8.4 or later | 4 and 5 | firebird | no |
| DuckDB | supported for small, read-mostly sites | duckdb | ffi (with ffi.enable=true) and libduckdb | 1.5.6 and 2.0.1; a whole site on 2.0.1 | duckdb | no |
| libSQL server (sqld) | supported | libsql (sqld) | curl | sqld 0.24.33; a whole site | libsql | no: the DFS metadata goes in another database |
| IBM Db2 | supported, one web server | db2 (ibm_db2) | pdo_ibm or ibm_db2 | 11.5.9 and 12.1.6; a whole site on 12.1 | db2 | no |
| IBM Informix | supported, one web server | informix (ifx) | ibm_db2 | 14.10 and 15.0.1 | informix | no |
| SAP HANA | supported, one web server (HANA Cloud untested) | hana (saphana) | odbc or pdo_odbc with SAP's HANA ODBC driver | HANA, express edition 2.00 | hana | no |
| MonetDB | supported, one writer at a time | monetdb | none (MAPI in plain PHP) | Dec2023-SP4 and Dec2025-SP5; a whole site on Dec2025-SP5 | monetdb | no |
| ODBC: SQL Server, PostgreSQL, MariaDB and MySQL | supported | odbc with [ODBCSettings] Dialect | pdo_odbc or odbc | whole sites on SQL Server 2022, PostgreSQL 17 and MariaDB 11.4; LocalDB on Windows | odbc with --db-dialect | the dialect's |
| ODBC: Db2 | experimental | odbc, dialect db2 | pdo_odbc or odbc | none: the native Db2 driver is tested, the ODBC route is not | odbc --db-dialect=db2 | no |
| MySQL protocol: TiDB, Vitess and PlanetScale, SingleStore | supported | tidb, vitess, singlestore | mysqli | TiDB 8.5, Vitess (vttestserver), SingleStore (dev image): live tests | the same names | yes, the MySQL backend |
| MySQL protocol: Percona Server, Percona XtraDB Cluster, Dolt, OceanBase | supported | percona, pxc, dolt, oceanbase | mysqli | Percona 8.4, PXC 8.4, Dolt and OceanBase CE (current images): live tests and a whole site, when the driver changes | the same names | as MySQL, not tested |
| PostgreSQL protocol: CockroachDB, YugabyteDB | supported | cockroachdb, yugabytedb | pgsql | CockroachDB 25.2, YugabyteDB 2.25: live tests | the same names | yes, the PostgreSQL backend |
| PostgreSQL protocol: AlloyDB Omni, TimescaleDB, Citus | supported | alloydb, timescaledb, citus | pgsql | current images (TimescaleDB on PostgreSQL 17): live tests and a whole site, when the driver changes | the same names | as PostgreSQL, not tested |
| MongoDB protocol: FerretDB | supported | ferretdb | mongodb | FerretDB 2 over PostgreSQL with DocumentDB: live tests and a whole site, when the driver changes | ferretdb | as MongoDB, not tested |
| Cloud services of those protocols: MariaDB Xpand, Amazon Aurora MySQL, Neon, Supabase, Amazon Aurora PostgreSQL, Amazon DocumentDB, Azure Cosmos DB for MongoDB | experimental | xpand, aurora, neon, supabase, aurorapostgresql, documentdb, cosmosdb, cosmosdbvcore | the protocol's | none: profiles and tests without a server | the same names | not tested |
| Turso | experimental | turso | curl | none: the libSQL driver over HTTPS | turso | no |
| rqlite | experimental | rqlite | curl | tests without a server only; a site was measured by hand on 8.43 with three nodes | rqlite | not tested |
| SQLCipher | experimental | sqlite3 with SQLiteEncryptionKey | sqlite3 linked against SQLCipher | none; measured by hand on 4.6 | sqlite | as SQLite |
| SAP ASE (Sybase) | experimental | ase (sybase) | pdo_dblib or pdo_odbc | tests without a server only: no ASE server to test against | ase | no |
Engines that do not hold a site
Each of these lacks something every site needs (transactions across statements, joins, enforced keys, sequences or plain SQL), so the installers do not offer them. They are new in 6.0.15.
| Database | What it is for | Driver or command | CI |
|---|---|---|---|
| ClickHouse | data tables, import | clickhouse (HTTP, no extension) | 24.8 and 25.8 |
| Apache Cassandra and ScyllaDB | data tables, exp:cassandra:import | cassandra, scylladb (the library mroosz/php-cassandra) | Cassandra 5.0, ScyllaDB 2025.1 |
| Couchbase | data tables, exp:couchbase:import | couchbase (curl) | Community 7.2.4 and 7.6.2 |
| Apache CouchDB | data tables, exp:couchdb:import | couchdb (curl and sqlite3) | 3.3.3 and 3.4.3 |
| Microsoft Access | exp:access:import everywhere; data tables on Windows | msaccess (Windows, ACE driver); MDBTools on Linux | the import on Linux; driver and import on Windows Server 2022 and 2025 |
| Google Cloud Spanner, PostgreSQL dialect | data tables, import | spanner (pgsql, through PGAdapter) | the Spanner emulator behind PGAdapter |
| StarRocks, Apache Doris, Manticore Search | data tables | starrocks, doris, manticore (mysqli) | current images (Doris 2.1), when the driver changes |
| QuestDB, Materialize, RisingWave, CrateDB | data tables | questdb, materialize, risingwave, cratedb (pgsql) | current images, when the driver changes |
| Exasol and Databricks | data tables, exp:odbc:import | ODBC dialects | Exasol, and a Spark Thrift server for the Databricks dialect, when the driver changes |
| Snowflake, BigQuery, Teradata, OpenEdge, FileMaker, Ingres | data tables | ODBC dialects | none: they need accounts or licenses (experimental) |
| Any other database with an ODBC driver | data tables | odbc | as ODBC |
| Redis, Valkey, RethinkDB, RavenDB, Riak KV | import only | exp:redis:import, exp:valkey:import, exp:rethinkdb:import, exp:ravendb:import, exp:riak:import | Redis 6.2 and 7.4, Valkey 7.2 and 8.1, RethinkDB 2.4, RavenDB 6.0 and 6.2, Riak KV 2.2.3 |
| Neo4j, ArangoDB, SurrealDB, Amazon Neptune | data tables, import | neo4j, arangodb, surrealdb, neptune | none: tests without a server in the PHPUnit job; live tests run by hand (experimental) |
| DynamoDB, Firestore, Datastore, Cosmos DB for NoSQL | import only | exp:dynamodb:import, exp:firestore:import, exp:datastore:import, exp:cosmosdb:import | none: measured by hand against the emulators (experimental) |
| Cloudflare D1 | a small data table at most | d1 (curl) | none (experimental): one HTTPS request per statement against Cloudflare's API limits rules out a site |
Valkey and Redis also serve as a cache backend through the sevenx_valkey_cache extension; that is caching, not a
database for content.
How to choose
| Your situation | Choose |
|---|---|
| One server, a small to large editorial site, no database administrator | SQLite 3: nothing to install, backups are one file, readers scale with the processes, writers queue. |
| A database server, several web servers, replication, point-in-time recovery | PostgreSQL, the recommended server. |
| The organization runs MongoDB (or Atlas) and wants nothing else | MongoDB, through the adapter; read its limits first. |
| An existing MariaDB or MySQL platform, or extensions written for MySQL | MariaDB (preferred) or MySQL. |
| The organization is standardized on Oracle | Oracle 19c or later through ezoracle. |
| The organization is standardized on Microsoft | SQL Server 2017 or later, or Azure SQL. |
| A cluster database that scales writes over many nodes | CockroachDB, YugabyteDB or TiDB, through their protocol drivers. |
| Firebird, Db2, Informix or SAP HANA is the house database | Its driver, for a site on one web server. |
| A demo, build or single-editor site in one file | SQLite, or DuckDB for a read-mostly one. |
| Analytics, warehouse or NoSQL data next to a site | A data table connection or an import, not a site database. |
When in doubt, start with SQLite and move to PostgreSQL when a second web server or a database team arrives; the move is described in Moving a site to another engine. The decision guide per use case, with every database of 6.0.15 in one matrix, is Choosing a database.
Install and set up
Before you install
- One PHP extension of the chosen database must be loaded in the PHP that runs the installer and in the web
server's PHP; they are configured separately, so check both with
php -m. The setup wizard's checkdatabase_extensionspasses when one ofsqlite3,mysqli,pgsql,mongodb,oci8,sqlsrv,pdo_sqlsrv,pdo_firebird,pdo_ibm,ibm_db2,ffi,pdo_odbc,odbcorcurlis loaded (settings/setup.ini). - The installers do not create a server's database or user. Create them first, in UTF-8; the sections below show how. SQLite and DuckDB create their file themselves.
- Three installers, the same result: the setup wizard in the browser, the kickstarter (
kickstart.ini,[database_choice] Type=) and the console installexp:install. All three install the kernel schema, a site package and its siteaccesses (Getting Started). exp:installis a dry run until--apply. It takes--db,--db-host,--db-port,--db-name,--db-userand--db-socket, and the password from the environment variableEXP_INSTALL_DB_PASSWORD, so it stays out of the shell history and the process list.--db-action=remove(the default) empties the database first.- Never commit the override file the installers write (
settings/override/site.ini.append.php): it holds the password.
SQLite 3
The default; nothing to prepare.
php bin/php/console exp:install --applyThe file is var/storage/sqlite3/exponential.db (--db-name changes it). SQLite 3.33 or later is needed. Every
process that uses the site (the web server's PHP, Velocity's workers, cronjobs, console commands) must be able to
write the directory and its four files (the database, -wal, -shm and .writer-lock): one common group,
directory mode 2775, umask 0002. Writers queue on the lock for up to SQLiteTransactionWait seconds (25 on the
web, SQLiteCLITransactionWait 300 on the command line). Details:
SQLite database support.
PostgreSQL
PostgreSQL 13 or later. Make the site's user the owner of its database:
sudo -u postgres createuser --pwprompt exponential
sudo -u postgres createdb --owner=exponential --encoding=UTF8 --template=template0 exponential
EXP_INSTALL_DB_PASSWORD='<the password>' php bin/php/console exp:install --apply --db=pgsql \
--db-host=localhost --db-name=exponential --db-user=exponentialThe installer creates the extension pgcrypto (trusted from PostgreSQL 13 on); install your distribution's contrib
package if the server lacks it. Details: PostgreSQL.
MongoDB
MongoDB 6.0 or later, PHP 8.2 or later, the PECL extension mongodb 1.18 or later and the Composer
library (composer require mongodb/mongodb). Create a user in the site's own database with the roles readWrite and
dbAdmin, then:
EXP_INSTALL_DB_PASSWORD='<the password>' php bin/php/console exp:install --apply --db=mongodb \
--db-name=exponential --db-user=exponential
mongosh "mongodb://exponential@localhost:27017/exponential" --file bin/mongodb/create_indexes.jsThe indexes matter: without them subtree queries and URL alias lookups scan whole collections. In the setup wizard the configuration step can take one to three minutes; prefer the console. Details: MongoDB as the database.
MariaDB and MySQL
One driver, eZMySQLiDB, on mysqli. Create the database in utf8mb4 with InnoDB:
CREATE DATABASE exponential CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'exponential'@'localhost' IDENTIFIED BY '<a strong password>';
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES, CREATE TEMPORARY TABLES
ON exponential.* TO 'exponential'@'localhost';EXP_INSTALL_DB_PASSWORD='<the password>' php bin/php/console exp:install --apply --db=mariadb \
--db-name=exponential --db-user=exponential--db=mariadb and --db=mysql are the same path; --db-socket takes a Unix socket instead of host and port. Use a
release your vendor still supports. Details: MariaDB and MySQL.
Oracle
Oracle Database 19c or later in AL32UTF8, PHP's oci8 built against an Oracle client (the Instant Client is
enough) and the ezoracle extension, which every installation has because composer.json requires it; the
installers activate it for an Oracle site.
EXP_INSTALL_DB_PASSWORD='<the password>' php bin/php/console exp:install --apply --db=oracle \
--db-host=127.0.0.1 --db-port=1521 --db-name=FREEPDB1 --db-user=exponential--db-name is the service name; a full connect string or a TNS alias (@alias) is taken as it is.
php extension/ezoracle/bin/php/ora-grant.php prints the grants for a DBA to run. Details:
Oracle.
Microsoft SQL Server and Azure SQL
SQL Server 2017 or later, Azure SQL Database or Azure SQL Managed Instance. Create the database first with a UTF-8
collation (for example Latin1_General_100_CI_AS_SC_UTF8, SQL Server 2019 and later) and
READ_COMMITTED_SNAPSHOT, then:
EXP_INSTALL_DB_PASSWORD='<the password>' php bin/php/console exp:install --apply --db=sqlserver \
--db-host=sql1.example.com --db-name=site --db-user=exponential--db-encrypt (yes by default, no or strict) and --db-trust-server-certificate set the TLS of the
connection. [SQLServerSettings] Layer=auto takes the first of sqlsrv, pdo_sqlsrv, pdo_odbc and pdo_dblib
that is loaded; the setup wizard offers SQL Server when sqlsrv or pdo_sqlsrv is loaded. Details:
Microsoft SQL Server driver.
The other site databases
Each takes exp:install --apply --db=<name> with the defaults below; the database must exist unless the table says
otherwise.
| Database | --db= | Defaults and notes |
|---|---|---|
| Firebird 4 or 5 | firebird | port 3050, user SYSDBA; pdo_firebird of PHP 8.4 or later; the database created with PAGE_SIZE 16384 and UTF8 |
| DuckDB 1.5 or later | duckdb | --db-name is the file (default var/storage/duckdb/exponential.duckdb), created by the installer; ffi.enable=true in the web PHP |
| libSQL server (sqld) 0.22 or later | libsql | port 8080 or --db-url; --db-tls; the password is the server's auth token; --db-mode=file for the embedded file mode |
| IBM Db2 11.5 or 12.1 | db2 | port 50000, user db2inst1, database EXP |
| IBM Informix 14.10 or 15 | informix | the DRDA port 9089, user informix |
| SAP HANA 2.0 SPS 05 or later | hana | port 39041, user SYSTEM, the schema EXPONENTIAL; SAP's HANA ODBC driver registered as HDBODBC |
| MonetDB Dec2023 or later | monetdb | port 50000, user monetdb; monetdb create and monetdb release first |
| MySQL protocol | tidb, vitess, singlestore, xpand, aurora, percona, pxc, dolt, oceanbase | --db-ssl=enabled or verify and --db-ssl-ca; TiDB port 4000, OceanBase 2881; on Vitess the keyspace must exist |
| PostgreSQL protocol | cockroachdb, yugabytedb, neon, supabase, aurorapostgresql, alloydb, timescaledb, citus | --db-sslmode, --db-sslrootcert, --db-pooler, --db-endpoint (Neon); CockroachDB port 26257, YugabyteDB 5433 and user yugabyte |
| MongoDB protocol | ferretdb, documentdb, cosmosdb, cosmosdbvcore | port 27017 (Cosmos DB 10255, vCore 10260) |
| SQLite over HTTP | turso, rqlite, d1 | Turso port 443 and a required auth token; rqlite and D1 have no interactive transactions |
| SAP ASE 15.7 or 16.0 | ase | port 5000, user sa; kickstarter and exp:install only, not the setup wizard |
The kickstarter takes the same databases in kickstart.ini ([database_choice] Type=). The setup wizard offers each
one when the PHP running it can reach it: its extension is loaded (for SAP HANA also SAP's ODBC driver registered, for
MonetDB only a socket). It does not offer SAP ASE or Cloudflare D1. The full table of the three installers is
Installer support per path.
A site over ODBC
DatabaseImplementation=odbc carries a site on SQL Server, PostgreSQL and MariaDB or MySQL through their ODBC
drivers, on pdo_odbc (the default) or odbc, with unixODBC on Linux:
EXP_INSTALL_DB_PASSWORD='<the password>' php bin/php/console exp:install --apply --db=odbc \
--db-dialect=postgresql --db-host=localhost --db-name=exponential --db-user=exponential--db-dialect is sqlserver, postgresql, mysql (MariaDB too) or db2; --db-odbc-driver, --db-dsn (an
odbc.ini data source, PostgreSQL and MySQL) and --db-connection-string complete it. SQL Server and Db2 run on
their own drivers with ODBC as the layer. Details:
A site over ODBC.
Which database a site uses
- Setup > System information, the Database card: engine and server version, driver class, server or file, character set, number of tables and size.
- On the command line:
php bin/php/console exp:ini get site.ini/DatabaseSettings/DatabaseImplementation --allow-root-user. - In code:
eZDB::instance()->databaseName()returnssqlite,postgresql,mongo,mysql,oracle,SQLServerand so on. The MySQL protocol drivers answermysql, the PostgreSQL protocol driverspostgresql(databaseVariant()names the product), libSQL and Tursosqlite.
Settings in site.ini
The connection is the block [DatabaseSettings] of settings/site.ini, overridden (never edited in place) in
settings/override/site.ini.append.php or a siteaccess's site.ini.append.php. The installers write the override.
| Key | Meaning |
|---|---|
DatabaseImplementation | The driver, by an alias that ImplementationAlias[] maps to a class. site.ini itself says ezmysqli; the installers write the database you chose (sqlite3 by default). |
Server, Port, Socket | Where the server is; Socket is a MySQL and MariaDB Unix socket instead of host and port. |
User, Password, Database | The account and the database (for SQLite the file, for Oracle the connect string). |
Charset | utf-8; keep the database itself in UTF-8 (utf8mb4, UTF8, AL32UTF8, a _UTF8 collation). |
UsePersistentConnection | One connection per PHP process; under Velocity's persistent workers each worker keeps its connection anyway. |
UseSlaveServer, SlaveServerArray[] and the related keys | Read replicas (PostgreSQL, MySQL and MariaDB, Oracle); see Read replicas. |
ConnectRetries | How often to connect again when the first attempt fails. |
SQLOutput, SlowQueriesOutput, QueryAnalysisOutput | Statements in the debug output, only the slower ones, and EXPLAIN on MySQL and MariaDB. |
InListChunkSize, InListChunkSizes[] | How many ids go into one IN list (1000 by default; Oracle never more than 1000). |
SQLitePragmas[], SQLiteTransactionWait, SQLiteCLITransactionWait, SQLiteBusyTimeout, SQLiteCLIBusyTimeout, SQLiteEncryptionKey, SQLiteLockDirectory | SQLite only: PRAGMAs, the writer queue, SQLCipher's key (a reference such as env:NAME, never the key itself) and the lock files' directory (for LiteFS). |
MongoSQLFallback, MongoSQLFallbackMaxRows | MongoDB only: SQL the adapter cannot translate runs on an in-memory SQLite copy of the collections it names (on by default, up to 200000 documents). |
Drivers with more settings have a block of their own: [SQLServerSettings], [ODBCSettings], [DuckDBSettings],
[HANASettings], [ASESettings], [MonetDBSettings], [MySQLWireSettings], [MongoWireSettings], and
ezoracle.ini for Oracle. After a change, clear the INI cache and restart Velocity's workers:
php bin/php/ezcache.php --clear-tag=ini --allow-root-user
php bin/php/console exp:velocity restart --allow-root-userNote
A mistyped DatabaseImplementation does not stop the request at once: the kernel falls back to a null
database and logs "Database implementation not supported" in var/log/error.log, and every content page fails.
Every alias, with its class: The settings: DatabaseSettings in site.ini.
Clusters, DFS and read replicas
DFS metadata backends
A DFS cluster lets several web servers serve one site: the files live on a shared folder, their metadata in a
database. exp:cluster:enable turns a site into a cluster, exp:cluster:status shows it, exp:cluster:disable turns
it back. exp:cluster:enable --backend= takes auto (the site's own engine), mysqli, postgresql, oracle,
sqlserver, mongodb or sqlite, and refuses an engine with no backend. exp:install --cluster=one-node does it
during the install, on the MySQL family, PostgreSQL, and ODBC with the PostgreSQL, SQL Server or MySQL dialect.
| Site database | DFS backend | Notes |
|---|---|---|
| MariaDB, MySQL and the MySQL protocol databases | eZDFSFileHandlerMySQLiBackend, gateway dfsmysqli (the default) | MySQL 8.0 in CI; measured on TiDB, Vitess and SingleStore |
| PostgreSQL and the PostgreSQL protocol databases | expDFSFileHandlerPostgresqlBackend, gateway dfspostgresql | PostgreSQL 13 to 19 in CI; measured on CockroachDB and YugabyteDB. It replaces the deprecated ezpostgresqlcluster extension, which composer.json no longer suggests |
| MongoDB | expDFSFileHandlerMongoDBBackend, gateway dfsmongodb | MongoDB 5.0 and later, a single server or a replica set; 8.0 in CI |
| Oracle | expDFSFileHandlerOracleBackend, gateway dfsoracle | Oracle 12.1 and later, with only oci8; Oracle Free 23 in CI |
| SQL Server, Azure SQL | expDFSFileHandlerSQLServerBackend, gateway dfssqlserver | SQL Server 2017 and later, Azure SQL; in CI |
| SQLite | expDFSFileHandlerSQLiteBackend, gateway dfssqlite | one machine only: the PHP servers of one host on one share; pdo_sqlite, SQLite 3.24 and later |
| ODBC | the dialect's backend | SQL Server and PostgreSQL over PDO_ODBC, MariaDB and MySQL through mysqli |
| Firebird, DuckDB, libSQL, rqlite, Db2, Informix, SAP HANA, SAP ASE, MonetDB | none yet: exp:cluster:enable refuses them | the site runs on one web server; a libSQL site can be shared by several web servers with the DFS metadata in another database |
The overview of the cluster, its share, the gateways and the web server rules is Clustering in Exponential 6.0.
Read replicas
UseSlaveServer=enabled with SlaveServerArray[] sends reads to a replica on PostgreSQL, MySQL and MariaDB, and
Oracle (ezoracle). Since 6.0.15 one rule applies to all of them: a statement goes to a replica only when it is a
plain SELECT of an anonymous GET or HEAD request that has written nothing yet, outside a transaction, and only
from a replica that is current (SlaveServerStatusCheck, SlaveServerMaxLag, SlaveServerCatchUp). Cronjobs,
scripts, POST requests and signed-in users always use the primary, so an edit is never read back stale. SQL Server
reads from Always On availability groups with ApplicationIntent=ReadOnly. Details:
Read replicas.
Several servers on SQLite
A SQLite file cannot be shared by several web servers over a network file system. One SQLite site can run on several
nodes with LiteFS instead: one node is the primary and the only writer, the others hold read-only replicas, and
Exponential Velocity forwards every request that may write to the primary (SQLiteLockDirectory keeps the lock
files outside the LiteFS mount). Litestream adds a continuous copy for backup and restore to a point in time; it is
not a second writer. The files still need the DFS, with their metadata in a server database:
Several servers: LiteFS and Litestream.
LiteFS is not in CI.
Wire-protocol compatible databases
Many products speak the protocol of a database Exponential already has a driver for. Each runs on that driver with a profile of what its product does differently (locks, retries, sequences, DDL, poolers, TLS), and to the kernel it is the database whose protocol it speaks. The protocol's PHP extension is all it needs.
The PostgreSQL protocol
expPostgreSQLWireDB, a subclass of the PostgreSQL driver, with one profile per product. Sites: CockroachDB 23.2 or
later (cockroachdb), YugabyteDB 2.20 or later (yugabytedb), AlloyDB Omni (alloydb), TimescaleDB
(timescaledb), Citus (citus, also Azure Cosmos DB for PostgreSQL), and, untested, Neon (neon), Supabase
(supabase) and Amazon Aurora PostgreSQL (aurorapostgresql). Data tables only: Google Cloud Spanner's PostgreSQL
dialect through PGAdapter (spanner), QuestDB, Materialize, RisingWave and CrateDB. On CockroachDB LOCK TABLE is
replaced by row locks and serialization failures are retried; YugabyteDB has no pgcrypto and applies no lock
timeout. Details: Databases of the PostgreSQL wire protocol.
The MySQL protocol
expMySQLWireDB, the MySQL driver with a profile per product. Sites: TiDB 6.5 or later (tidb), Vitess and
PlanetScale in an unsharded keyspace (vitess), SingleStore 8.5 or later (singlestore), Percona Server
(percona), Percona XtraDB Cluster (pxc, writes to one node), Dolt (dolt) and OceanBase in MySQL mode
(oceanbase); untested: MariaDB Xpand (xpand) and Amazon Aurora MySQL (aurora). Data tables only: StarRocks,
Apache Doris and Manticore Search. Vitess and SingleStore have no foreign keys; on PlanetScale a transaction is
killed after the tablet's timeout, so install with a longer one. Details:
Databases that speak the MySQL protocol.
The MongoDB protocol
Subclasses of the MongoDB adapter: FerretDB (ferretdb, a site in CI on FerretDB 2 over PostgreSQL with DocumentDB),
and, untested, Amazon DocumentDB (documentdb) and Azure Cosmos DB for MongoDB (cosmosdb for request units,
cosmosdbvcore for vCore). Details: Databases of the MongoDB wire protocol.
SQLite over HTTP
libSQL is a fork of SQLite: expLibSQLDB is the SQLite driver with an HTTP transport, so the SQL and the schema are
SQLite's, and several web servers can share one libSQL server. Turso is libSQL as a cloud service (untested).
rqlite (rqlite) and Cloudflare D1 (d1) run on drivers of the same family, without interactive transactions. Details:
libSQL and Turso driver.
Data table connections and import sources
Connections
A data table connection is a database the installation uses besides its own: the site's
own database (site), a block [Connection_<identifier>] of datatable.ini, or a connection made in the
administration under Setup > Data tables > Connections. Persistent classes can live on a connection, and the
administration makes, describes, reads and writes its tables. The engines are sqlite, mysql (MariaDB too),
postgresql, oracle, sqlserver, mongodb, odbc, msaccess, firebird, duckdb, the PostgreSQL and MySQL
protocol products, and the data table drivers of the previous sections (the Connections page marks the engines not
yet measured there, such as sqlserver and the cloud services, as untested); an engine without a kernel driver goes
through expPDODB, a generic driver over PDO. The password is a secret's name (Secret=env:NAME), never the password
itself.
[Connection_archive]
Name=Archive database
Engine=postgresql
Server=db2.example.com
Port=5432
Database=archive
User=archive
Secret=env:ARCHIVE_DB_PASSWORD
ReadOnly=trueImport commands
Each import copies the tables, collections or keys of a source into the site's database or a data table connection:
| Command | Source |
|---|---|
exp:access:import | Microsoft Access files (.accdb, .mdb), on Linux with MDBTools |
exp:cassandra:import | Apache Cassandra, ScyllaDB |
exp:couchbase:import, exp:couchdb:import | Couchbase, Apache CouchDB |
exp:odbc:import | any database with an ODBC driver (Exasol measured in CI) |
exp:neo4j:import, exp:arangodb:import, exp:surrealdb:import, exp:neptune:import | graph databases |
exp:redis:import, exp:valkey:import, exp:rethinkdb:import, exp:ravendb:import, exp:riak:import | key-value and document stores |
exp:dynamodb:import, exp:firestore:import, exp:datastore:import, exp:cosmosdb:import | cloud NoSQL services |
Run any of them with --help for its options; rows can also come in through 7x SQLI Import
(Importing rows with 7x SQLI Import).
Tested in CI
What the workflows of .github/workflows/ run. The PHPUnit workflow runs on every push and pull request to main;
the workflows marked "when the driver changes" run when their driver's files change, and the container image test
runs nightly.
| Database | Job | What runs |
|---|---|---|
| SQLite 3 | PHPUnit (PHP 8.1 to 8.5); Windows | driver tests; on Windows Server 2022 and 2025 a site installed with exp:install and its pages fetched, and xne upgrading a 6.0.14 SQLite site to main and rolling it back |
| PostgreSQL | Database tests; DFS cluster backends | the legacy test suites on PostgreSQL 13, 15, 18 and 19 with a database per test; the DFS backend on 13 to 19 |
| MySQL | Database tests; DFS cluster backends | the test suites and the DFS backend on MySQL 8.0 |
| MariaDB | ODBC; container image (nightly) | a whole site over ODBC on MariaDB 11.4; a site in the container image on MariaDB 11.8 |
| MongoDB | Database tests; DFS cluster backends; MongoDB wire databases (when the driver changes) | the migrations' live tests on MongoDB 7; the DFS backend on 8.0; the adapter's tests without a server; a whole site on 5.0 and on FerretDB 2 |
| Oracle | DFS cluster backend | the Oracle DFS backend on Oracle Free 23 with oci8 |
| SQL Server | sqlserver; SQL Server LocalDB smoke | driver, live and DFS tests: 2022 on sqlsrv, pdo_sqlsrv and pdo_odbc, 2025 and 2017 on sqlsrv, 2019 on pdo_sqlsrv, PHP 8.1 to 8.5; LocalDB on Windows |
| Firebird | firebird | driver, live and kernel schema tests on 4 and 5, PHP 8.4 and 8.5 |
| DuckDB | duckdb | driver and live tests on 1.5.6 and 2.0.1; a whole site on 2.0.1 |
| libSQL | libsql | driver and live tests on sqld 0.24.33; a whole site |
| IBM Db2, IBM Informix | db2 | driver, live and kernel schema tests on Db2 11.5 and 12.1 and Informix 14.10 and 15; a whole site on Db2 12.1 |
| SAP HANA, SAP ASE | hana | HANA, express edition: driver, live and kernel schema tests on odbc and pdo_odbc; ASE: tests without a server |
| MonetDB, ClickHouse | columnar | live tests on MonetDB Dec2023-SP4 and Dec2025-SP5 and ClickHouse 24.8 and 25.8; a whole site on MonetDB |
| ODBC | odbc; ODBC on Windows; ODBC platforms (when the driver changes) | live tests on SQL Server, PostgreSQL, MariaDB and SQLite on both layers, whole sites on the first three; LocalDB on Windows; Exasol and the Databricks dialect |
| MS Access | msaccess-windows; odbc | the driver and the import on Windows Server 2022 and 2025; the import on Linux with MDBTools |
| PostgreSQL protocol | pgwire; PostgreSQL wire engines (when the driver changes) | CockroachDB 25.2, YugabyteDB 2.25 and the Spanner emulator, PHP 8.1 and 8.5; AlloyDB Omni, TimescaleDB, Citus (with a whole site), QuestDB, Materialize, RisingWave, CrateDB |
| MySQL protocol | mysqlwire; MySQL wire engines (when the driver changes) | TiDB 8.5, Vitess and SingleStore; Percona Server, Percona XtraDB Cluster, Dolt, OceanBase (with a whole site), StarRocks, Doris, Manticore |
| Cassandra, ScyllaDB | cassandra | live data table and import tests on Cassandra 5.0 and ScyllaDB 2025.1 |
| Couchbase, CouchDB | couch | live tests on Couchbase 7.2.4 and 7.6.2 and CouchDB 3.3.3 and 3.4.3 |
| Key-value stores | keyvalue | the imports from Redis, Valkey, RethinkDB, RavenDB and Riak KV |
PHP 8.0, the oldest supported version, and PHP 7.4 (usable without support) get a syntax check and a boot test without a database in the Quality workflow. How to run the suites locally: Continuous integration.
Limits and known gaps
- SQLite: one writer at a time, queued, on one host or on the LiteFS primary; no replication of its own.
- MongoDB: SQL the adapter cannot translate (joins,
GROUP BY ... HAVING,UNION, sub-selects) runs on an in-memory SQLite copy; a collection overMongoSQLFallbackMaxRowsdocuments is not copied, and such a statement is refused and logged. The SQL query cache does not apply, and there are no SQL update files: the upgrade check compares collections instead (MongoDB limits). - MariaDB and MySQL: the connection character set
utf-8is MySQL's three-byteutf8, so characters outside the Basic Multilingual Plane, such as emoji, cannot pass the connection even when the tables areutf8mb4. - Oracle: CI covers only its DFS backend; site installs are measured by hand against Oracle AI Database 26ai Free.
Oracle stores
''as NULL and compares strings case-sensitively (OracleEmptyStringForNull,OracleCaseInsensitive). - SQL Server: no schema update files yet (the schema is
kernel/sql/sqlserver/), and xne refuses it. - Firebird, DuckDB, Db2, Informix, SAP HANA, MonetDB: no DFS backend and no read replicas: one web server. DuckDB and MonetDB let one writer write at a time.
- Sorting: PostgreSQL and Oracle sort NULL after every value in ascending order, MySQL and SQLite before; ties come back in each engine's own order. Lists sorted by an often empty column can differ between engines.
- Case: MySQL's default collations compare without case, PostgreSQL, Oracle and MongoDB with case. Compare
lower(...)on both sides where case must not matter. - Extension code written for MySQL (backtick quoting, MySQL-only
SETstatements) can fail on the other engines; use the kernel's database API instead of hand-written SQL. - Untested products: everything marked experimental above; the graph databases, the cloud NoSQL imports, rqlite, SQLCipher and LiteFS were measured by hand, not in CI.
- xne refuses every database except SQLite, PostgreSQL, MariaDB and MySQL, MongoDB and Oracle.
- Not planned: Redis and Valkey as a primary store (they stay a cache and an import source). The databases being verified or needing new driver work are listed in Planned databases; nothing there is a promise of a release.
Backups, upgrades and moving between engines
Backups
A complete backup is the database and the files: var/storage, settings/override and settings/siteaccess.
| Database | Backup | Restore |
|---|---|---|
| SQLite 3 | sqlite3 var/storage/sqlite3/exponential.db ".backup '/backup/exponential.db'" | .restore; never copy a database file in use |
| PostgreSQL | pg_dump -Fc | pg_restore --clean |
| MongoDB | mongodump | mongorestore --drop |
| MariaDB, MySQL | mariadb-dump or mysqldump --single-transaction | mariadb or mysql |
| Oracle | php bin/php/console ext:ezoracle:datapump, or Oracle's expdp | impdp |
| SQL Server, Azure SQL | BACKUP DATABASE, or the service's automated backups | RESTORE DATABASE |
| Firebird | gbak -b | gbak -c |
| Other databases | the database's or the service's own backup | the same |
Switch on maintenance mode before a restore (php bin/php/maintenance.php on --allow-root-user) and clear every
cache after it. Full procedure:
Backups and restore.
Upgrades
- The schema follows the engine.
exp:upgradeapplies the kernel's upgrade steps; the SQL update files are inupdate/database/mysql/,postgresql/andsqlite/. Oracle's are inezoracle; MongoDB has none (its steps are inexp:upgrade); SQL Server and the drivers new in 6.0.15 have no update files yet. - The safety copy that
exp:upgrademakes before it writes has a built-in dump for SQLite, MariaDB and MySQL, PostgreSQL and MongoDB only; on every other database make your own backup and run it with--no-backup. - xne backs up, upgrades and rolls back sites on SQLite, PostgreSQL, MariaDB and MySQL, MongoDB and Oracle, with an exact rollback of files and database; a site over ODBC with the PostgreSQL or MySQL dialect is treated as that engine. It refuses every other database until it has a verified backup for it (Upgrading with xne).
- Setup > Upgrade check, "Check database consistency", compares the tables, fields and indexes with the release's schema on MariaDB and MySQL, PostgreSQL, SQLite and MongoDB (The upgrade check).
Moving a site to another engine
The content stays the same when a site changes its database; only where it is stored changes. Plan a maintenance window: nothing may be published between the dump and the switch.
- Between SQL engines (SQLite, PostgreSQL, MariaDB, MySQL, and Oracle with
ezoracle): dump withphp bin/php/ezsqldumpschema.php --format=generic --output-array --output-types=allinto a.dbafile and load it withphp bin/php/ezsqlinsertschema.php --insert-types=all --type=<mysql|postgresql|sqlite3|oracle>. Then pointDatabaseImplementationand the connection keys at the new engine, clear all caches and restart the workers. - Into Oracle:
ext:ezoracle:mysql2oracle-schemaandext:ezoracle:mysql2oracle-data. - Into MongoDB: the scripts in
bin/mongodb/(export_mysql.sh,mysql2ndjson.py,import_all.sh,validate_ndjson.sh). - Check before you reopen: compare the row counts of
ezcontentobject,ezcontentobject_treeandezcontentobject_attributeon both sides; on PostgreSQL correct the sequences; sign in and publish a test object. - Later upgrades use the update files of the engine the site runs on now.
The step-by-step version is Switching an existing site to another engine; why and when to move: Moving off an old database.
How this page is kept true
This page is the source of truth for what Exponential says about its databases. The status of each database is
derived from the code and the CI of the main branch, in this order: a driver class and an ImplementationAlias[]
entry, an installer path, and a CI job that runs it against a live server. The product pages on network.se7enx.com
and se7enx.com show the same facts as a table; where they and this page differ, this page and the code win. When a
driver, an installer path or a CI job changes, change this page, Database support and the
database's own page in the same commit.
Related pages
- Database support: the detail of every database, its versions, settings, character sets, performance and engine parity.
- Choosing a database: every database in one matrix, with a guide per use case.
- Chapter 9 of the installation guide, Databases: the operator's reference for every engine.
- Getting Started and Installing Exponential 6.0.
- Clustering in Exponential 6.0 and Data tables.
- Moving off an old database, Exponential on Windows and Operating system support.