Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,199 of 9,199 pages
About the help in other languages
All help pages

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…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/DATABASES.md

On this page

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

  1. In short
  2. What the status words mean
  3. Every engine at a glance
  4. How to choose
  5. Install and set up
  6. Settings in site.ini
  7. Clusters, DFS and read replicas
  8. Wire-protocol compatible databases
  9. Data table connections and import sources
  10. Tested in CI
  11. Limits and known gaps
  12. Backups, upgrades and moving between engines
  13. How this page is kept true
  14. 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 and exp:install uses it when no --db is 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

StatusMeaning
DefaultWhat the installers choose when you choose nothing: SQLite 3.
RecommendedThe database server the project recommends for new sites: PostgreSQL.
SupportedA 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.
ExperimentalA 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, importNot 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

DatabaseStatusDatabaseImplementationPHP extensionCIexp:install --db=DFS
SQLite 3defaultsqlite3sqlite3the library of the CI images, PHP 8.1 to 8.5; a site on Windows Server 2022 and 2025sqlite (the default)one machine only
PostgreSQLrecommendedezpostgresql (pgsql, postgresql)pgsql13, 15, 18 and 19 (database tests); 13 to 19 (DFS backend); 17 (site over ODBC, container image)pgsqlyes
MongoDBsupportedmongodbmongodb and the library mongodb/mongodb7 (migration tests), 8.0 (DFS backend), 5.0 (a whole site, when the MongoDB protocol code changes)mongodbyes
MariaDBsupportedezmysqli (mysqli)mysqli11.4 (a whole site over ODBC), 11.8 (container image, nightly); the native mysqli suite runs on MySQL 8.0mariadbyes
Oraclesupported, through ezoracleezoracle (oracle)oci8Oracle Free 23 (the DFS backend only)oracleyes
MySQLsupportedezmysqli (mysqli, mysql)mysqli8.0 (database tests, DFS backend)mysqlyes
Microsoft SQL Server and Azure SQLsupported (new in 6.0.15)sqlserver (mssql, sqlsrv)sqlsrv, pdo_sqlsrv, pdo_odbc or pdo_dblib2017, 2019, 2022 and 2025; LocalDB on Windows. Azure SQL runs on the same driver; the service is not in CIsqlserveryes

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.

DatabaseStatusDatabaseImplementationPHP extensionCIexp:install --db=DFS
Firebirdsupported, one web serverfirebird (fb)pdo_firebird of PHP 8.4 or later4 and 5firebirdno
DuckDBsupported for small, read-mostly sitesduckdbffi (with ffi.enable=true) and libduckdb1.5.6 and 2.0.1; a whole site on 2.0.1duckdbno
libSQL server (sqld)supportedlibsql (sqld)curlsqld 0.24.33; a whole sitelibsqlno: the DFS metadata goes in another database
IBM Db2supported, one web serverdb2 (ibm_db2)pdo_ibm or ibm_db211.5.9 and 12.1.6; a whole site on 12.1db2no
IBM Informixsupported, one web serverinformix (ifx)ibm_db214.10 and 15.0.1informixno
SAP HANAsupported, one web server (HANA Cloud untested)hana (saphana)odbc or pdo_odbc with SAP's HANA ODBC driverHANA, express edition 2.00hanano
MonetDBsupported, one writer at a timemonetdbnone (MAPI in plain PHP)Dec2023-SP4 and Dec2025-SP5; a whole site on Dec2025-SP5monetdbno
ODBC: SQL Server, PostgreSQL, MariaDB and MySQLsupportedodbc with [ODBCSettings] Dialectpdo_odbc or odbcwhole sites on SQL Server 2022, PostgreSQL 17 and MariaDB 11.4; LocalDB on Windowsodbc with --db-dialectthe dialect's
ODBC: Db2experimentalodbc, dialect db2pdo_odbc or odbcnone: the native Db2 driver is tested, the ODBC route is notodbc --db-dialect=db2no
MySQL protocol: TiDB, Vitess and PlanetScale, SingleStoresupportedtidb, vitess, singlestoremysqliTiDB 8.5, Vitess (vttestserver), SingleStore (dev image): live teststhe same namesyes, the MySQL backend
MySQL protocol: Percona Server, Percona XtraDB Cluster, Dolt, OceanBasesupportedpercona, pxc, dolt, oceanbasemysqliPercona 8.4, PXC 8.4, Dolt and OceanBase CE (current images): live tests and a whole site, when the driver changesthe same namesas MySQL, not tested
PostgreSQL protocol: CockroachDB, YugabyteDBsupportedcockroachdb, yugabytedbpgsqlCockroachDB 25.2, YugabyteDB 2.25: live teststhe same namesyes, the PostgreSQL backend
PostgreSQL protocol: AlloyDB Omni, TimescaleDB, Citussupportedalloydb, timescaledb, cituspgsqlcurrent images (TimescaleDB on PostgreSQL 17): live tests and a whole site, when the driver changesthe same namesas PostgreSQL, not tested
MongoDB protocol: FerretDBsupportedferretdbmongodbFerretDB 2 over PostgreSQL with DocumentDB: live tests and a whole site, when the driver changesferretdbas MongoDB, not tested
Cloud services of those protocols: MariaDB Xpand, Amazon Aurora MySQL, Neon, Supabase, Amazon Aurora PostgreSQL, Amazon DocumentDB, Azure Cosmos DB for MongoDBexperimentalxpand, aurora, neon, supabase, aurorapostgresql, documentdb, cosmosdb, cosmosdbvcorethe protocol'snone: profiles and tests without a serverthe same namesnot tested
Tursoexperimentaltursocurlnone: the libSQL driver over HTTPStursono
rqliteexperimentalrqlitecurltests without a server only; a site was measured by hand on 8.43 with three nodesrqlitenot tested
SQLCipherexperimentalsqlite3 with SQLiteEncryptionKeysqlite3 linked against SQLCiphernone; measured by hand on 4.6sqliteas SQLite
SAP ASE (Sybase)experimentalase (sybase)pdo_dblib or pdo_odbctests without a server only: no ASE server to test againstaseno

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.

DatabaseWhat it is forDriver or commandCI
ClickHousedata tables, importclickhouse (HTTP, no extension)24.8 and 25.8
Apache Cassandra and ScyllaDBdata tables, exp:cassandra:importcassandra, scylladb (the library mroosz/php-cassandra)Cassandra 5.0, ScyllaDB 2025.1
Couchbasedata tables, exp:couchbase:importcouchbase (curl)Community 7.2.4 and 7.6.2
Apache CouchDBdata tables, exp:couchdb:importcouchdb (curl and sqlite3)3.3.3 and 3.4.3
Microsoft Accessexp:access:import everywhere; data tables on Windowsmsaccess (Windows, ACE driver); MDBTools on Linuxthe import on Linux; driver and import on Windows Server 2022 and 2025
Google Cloud Spanner, PostgreSQL dialectdata tables, importspanner (pgsql, through PGAdapter)the Spanner emulator behind PGAdapter
StarRocks, Apache Doris, Manticore Searchdata tablesstarrocks, doris, manticore (mysqli)current images (Doris 2.1), when the driver changes
QuestDB, Materialize, RisingWave, CrateDBdata tablesquestdb, materialize, risingwave, cratedb (pgsql)current images, when the driver changes
Exasol and Databricksdata tables, exp:odbc:importODBC dialectsExasol, and a Spark Thrift server for the Databricks dialect, when the driver changes
Snowflake, BigQuery, Teradata, OpenEdge, FileMaker, Ingresdata tablesODBC dialectsnone: they need accounts or licenses (experimental)
Any other database with an ODBC driverdata tablesodbcas ODBC
Redis, Valkey, RethinkDB, RavenDB, Riak KVimport onlyexp:redis:import, exp:valkey:import, exp:rethinkdb:import, exp:ravendb:import, exp:riak:importRedis 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 Neptunedata tables, importneo4j, arangodb, surrealdb, neptunenone: tests without a server in the PHPUnit job; live tests run by hand (experimental)
DynamoDB, Firestore, Datastore, Cosmos DB for NoSQLimport onlyexp:dynamodb:import, exp:firestore:import, exp:datastore:import, exp:cosmosdb:importnone: measured by hand against the emulators (experimental)
Cloudflare D1a small data table at mostd1 (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 situationChoose
One server, a small to large editorial site, no database administratorSQLite 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 recoveryPostgreSQL, the recommended server.
The organization runs MongoDB (or Atlas) and wants nothing elseMongoDB, through the adapter; read its limits first.
An existing MariaDB or MySQL platform, or extensions written for MySQLMariaDB (preferred) or MySQL.
The organization is standardized on OracleOracle 19c or later through ezoracle.
The organization is standardized on MicrosoftSQL Server 2017 or later, or Azure SQL.
A cluster database that scales writes over many nodesCockroachDB, YugabyteDB or TiDB, through their protocol drivers.
Firebird, Db2, Informix or SAP HANA is the house databaseIts driver, for a site on one web server.
A demo, build or single-editor site in one fileSQLite, or DuckDB for a read-mostly one.
Analytics, warehouse or NoSQL data next to a siteA 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 check database_extensions passes when one of sqlite3, mysqli, pgsql, mongodb, oci8, sqlsrv, pdo_sqlsrv, pdo_firebird, pdo_ibm, ibm_db2, ffi, pdo_odbc, odbc or curl is 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 install exp:install. All three install the kernel schema, a site package and its siteaccesses (Getting Started).
  • exp:install is a dry run until --apply. It takes --db, --db-host, --db-port, --db-name, --db-user and --db-socket, and the password from the environment variable EXP_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 --apply

The 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=exponential

The 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.js

The 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 5firebirdport 3050, user SYSDBA; pdo_firebird of PHP 8.4 or later; the database created with PAGE_SIZE 16384 and UTF8
DuckDB 1.5 or laterduckdb--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 laterlibsqlport 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.1db2port 50000, user db2inst1, database EXP
IBM Informix 14.10 or 15informixthe DRDA port 9089, user informix
SAP HANA 2.0 SPS 05 or laterhanaport 39041, user SYSTEM, the schema EXPONENTIAL; SAP's HANA ODBC driver registered as HDBODBC
MonetDB Dec2023 or latermonetdbport 50000, user monetdb; monetdb create and monetdb release first
MySQL protocoltidb, 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 protocolcockroachdb, 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 protocolferretdb, documentdb, cosmosdb, cosmosdbvcoreport 27017 (Cosmos DB 10255, vCore 10260)
SQLite over HTTPturso, rqlite, d1Turso port 443 and a required auth token; rqlite and D1 have no interactive transactions
SAP ASE 15.7 or 16.0aseport 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() returns sqlite, postgresql, mongo, mysql, oracle, SQLServer and so on. The MySQL protocol drivers answer mysql, the PostgreSQL protocol drivers postgresql (databaseVariant() names the product), libSQL and Turso sqlite.

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.

KeyMeaning
DatabaseImplementationThe 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, SocketWhere the server is; Socket is a MySQL and MariaDB Unix socket instead of host and port.
User, Password, DatabaseThe account and the database (for SQLite the file, for Oracle the connect string).
Charsetutf-8; keep the database itself in UTF-8 (utf8mb4, UTF8, AL32UTF8, a _UTF8 collation).
UsePersistentConnectionOne connection per PHP process; under Velocity's persistent workers each worker keeps its connection anyway.
UseSlaveServer, SlaveServerArray[] and the related keysRead replicas (PostgreSQL, MySQL and MariaDB, Oracle); see Read replicas.
ConnectRetriesHow often to connect again when the first attempt fails.
SQLOutput, SlowQueriesOutput, QueryAnalysisOutputStatements 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, SQLiteLockDirectorySQLite 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, MongoSQLFallbackMaxRowsMongoDB 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-user

Note

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 databaseDFS backendNotes
MariaDB, MySQL and the MySQL protocol databaseseZDFSFileHandlerMySQLiBackend, gateway dfsmysqli (the default)MySQL 8.0 in CI; measured on TiDB, Vitess and SingleStore
PostgreSQL and the PostgreSQL protocol databasesexpDFSFileHandlerPostgresqlBackend, gateway dfspostgresqlPostgreSQL 13 to 19 in CI; measured on CockroachDB and YugabyteDB. It replaces the deprecated ezpostgresqlcluster extension, which composer.json no longer suggests
MongoDBexpDFSFileHandlerMongoDBBackend, gateway dfsmongodbMongoDB 5.0 and later, a single server or a replica set; 8.0 in CI
OracleexpDFSFileHandlerOracleBackend, gateway dfsoracleOracle 12.1 and later, with only oci8; Oracle Free 23 in CI
SQL Server, Azure SQLexpDFSFileHandlerSQLServerBackend, gateway dfssqlserverSQL Server 2017 and later, Azure SQL; in CI
SQLiteexpDFSFileHandlerSQLiteBackend, gateway dfssqliteone machine only: the PHP servers of one host on one share; pdo_sqlite, SQLite 3.24 and later
ODBCthe dialect's backendSQL Server and PostgreSQL over PDO_ODBC, MariaDB and MySQL through mysqli
Firebird, DuckDB, libSQL, rqlite, Db2, Informix, SAP HANA, SAP ASE, MonetDBnone yet: exp:cluster:enable refuses themthe 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=true

Import commands

Each import copies the tables, collections or keys of a source into the site's database or a data table connection:

CommandSource
exp:access:importMicrosoft Access files (.accdb, .mdb), on Linux with MDBTools
exp:cassandra:importApache Cassandra, ScyllaDB
exp:couchbase:import, exp:couchdb:importCouchbase, Apache CouchDB
exp:odbc:importany database with an ODBC driver (Exasol measured in CI)
exp:neo4j:import, exp:arangodb:import, exp:surrealdb:import, exp:neptune:importgraph databases
exp:redis:import, exp:valkey:import, exp:rethinkdb:import, exp:ravendb:import, exp:riak:importkey-value and document stores
exp:dynamodb:import, exp:firestore:import, exp:datastore:import, exp:cosmosdb:importcloud 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.

DatabaseJobWhat runs
SQLite 3PHPUnit (PHP 8.1 to 8.5); Windowsdriver 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
PostgreSQLDatabase tests; DFS cluster backendsthe legacy test suites on PostgreSQL 13, 15, 18 and 19 with a database per test; the DFS backend on 13 to 19
MySQLDatabase tests; DFS cluster backendsthe test suites and the DFS backend on MySQL 8.0
MariaDBODBC; container image (nightly)a whole site over ODBC on MariaDB 11.4; a site in the container image on MariaDB 11.8
MongoDBDatabase 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
OracleDFS cluster backendthe Oracle DFS backend on Oracle Free 23 with oci8
SQL Serversqlserver; SQL Server LocalDB smokedriver, 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
Firebirdfirebirddriver, live and kernel schema tests on 4 and 5, PHP 8.4 and 8.5
DuckDBduckdbdriver and live tests on 1.5.6 and 2.0.1; a whole site on 2.0.1
libSQLlibsqldriver and live tests on sqld 0.24.33; a whole site
IBM Db2, IBM Informixdb2driver, 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 ASEhanaHANA, express edition: driver, live and kernel schema tests on odbc and pdo_odbc; ASE: tests without a server
MonetDB, ClickHousecolumnarlive tests on MonetDB Dec2023-SP4 and Dec2025-SP5 and ClickHouse 24.8 and 25.8; a whole site on MonetDB
ODBCodbc; 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 Accessmsaccess-windows; odbcthe driver and the import on Windows Server 2022 and 2025; the import on Linux with MDBTools
PostgreSQL protocolpgwire; 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 protocolmysqlwire; 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, ScyllaDBcassandralive data table and import tests on Cassandra 5.0 and ScyllaDB 2025.1
Couchbase, CouchDBcouchlive tests on Couchbase 7.2.4 and 7.6.2 and CouchDB 3.3.3 and 3.4.3
Key-value storeskeyvaluethe 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 over MongoSQLFallbackMaxRows documents 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-8 is MySQL's three-byte utf8, so characters outside the Basic Multilingual Plane, such as emoji, cannot pass the connection even when the tables are utf8mb4.
  • 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 SET statements) 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.

DatabaseBackupRestore
SQLite 3sqlite3 var/storage/sqlite3/exponential.db ".backup '/backup/exponential.db'".restore; never copy a database file in use
PostgreSQLpg_dump -Fcpg_restore --clean
MongoDBmongodumpmongorestore --drop
MariaDB, MySQLmariadb-dump or mysqldump --single-transactionmariadb or mysql
Oraclephp bin/php/console ext:ezoracle:datapump, or Oracle's expdpimpdp
SQL Server, Azure SQLBACKUP DATABASE, or the service's automated backupsRESTORE DATABASE
Firebirdgbak -bgbak -c
Other databasesthe database's or the service's own backupthe 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:upgrade applies the kernel's upgrade steps; the SQL update files are in update/database/mysql/, postgresql/ and sqlite/. Oracle's are in ezoracle; MongoDB has none (its steps are in exp:upgrade); SQL Server and the drivers new in 6.0.15 have no update files yet.
  • The safety copy that exp:upgrade makes 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 with php bin/php/ezsqldumpschema.php --format=generic --output-array --output-types=all into a .dba file and load it with php bin/php/ezsqlinsertschema.php --insert-types=all --type=<mysql|postgresql|sqlite3|oracle>. Then point DatabaseImplementation and the connection keys at the new engine, clear all caches and restart the workers.
  • Into Oracle: ext:ezoracle:mysql2oracle-schema and ext: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_tree and ezcontentobject_attribute on 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.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x