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

The DatabaseSettings reference

Every key of site.ini [DatabaseSettings] with its shipped default, the engines that read it and what it does - connection, character set, retries, persistent connections, replicas, transactions, debug output and the…

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/help/database-administrators/databasesettings-reference.md

On this page

The DatabaseSettings reference

This page is for database administrators who read or write the connection settings of an Exponential site. It lists every key of settings/site.ini, block [DatabaseSettings], as shipped in 6.0.x, with its default and the engines that use it, and gives a minimal block per engine. Sources: settings/site.ini and 9.1 How Exponential chooses a database driver.

Note

Never edit settings/site.ini itself: an upgrade replaces it. Put your values in settings/override/site.ini.append.php (the whole installation) or settings/siteaccess/<name>/site.ini.append.php (one siteaccess). See Reading and changing database settings.

Contents

  1. Connection keys
  2. Behavior keys
  3. Replica keys
  4. Debug keys
  5. SQLite keys
  6. Driver aliases
  7. Keys outside this block
  8. Minimal blocks per engine

Connection keys

KeyShipped defaultUsed byMeaning
DatabaseImplementationezmysqliallThe driver alias (Driver aliases). The installers write the value for your engine.
ServerlocalhostMySQL, PostgreSQL, MongoDBHost name or address. Not used by Oracle.
PortemptyMySQL, PostgreSQL, MongoDBEmpty means the driver's default port (3306, 5432, 27017). Not used by Oracle.
SocketdisabledMySQL, MariaDBA Unix socket path instead of host and port.
User, Passwordroot, emptyall but SQLiteThe login. Never keep the shipped root in production. MongoDB requires a user even without access control.
DatabasenextgenallThe database name; for SQLite the file; for Oracle the connect string.
Charsetutf-8MySQL, OracleThe connection character set (Character sets and collations).
UseBuiltinEncodingtrue"Use charset conversion routines in DB if possible" (comment in site.ini).

Behavior keys

KeyShipped defaultUsed byMeaning
ConnectRetries0MySQL, PostgreSQL, SQLiteHow often to try again when the first connection fails. MySQL and PostgreSQL wait between attempts; SQLite tries again at once. Oracle has its own RetryCount and falls back to this value.
UsePersistentConnectiondisabledMySQL, PostgreSQL, OracleReuse a connection across requests of the same PHP process (p: host prefix for mysqli, pg_pconnect for PostgreSQL).
TransactionsenabledallRun grouped writes in transactions. Leave it on.

Replica keys

KeyShipped defaultMeaning
UseSlaveServerdisabledSend reads to a replica chosen at random per request; writes go to Server. MySQL and MariaDB only.
SlaveServerArray[], SlaveServerPort[]commented outReplica hosts and ports.
SlaverServerUser[], SlaverServerPassword[], SlaverServerDatabase[]commented outReplica logins and database names. The keys really are spelled Slaver....

See MySQL and MariaDB read replicas.

Debug keys

KeyShipped defaultUsed byMeaning
SQLOutputdisabledallShow statements in the debug output.
SlowQueriesOutput0allWith a value above 0, only statements slower than this many milliseconds.
QueryAnalysisOutputdisabledMySQL, MariaDBWith SQLOutput=enabled, MySQL's EXPLAIN of each statement.
DebugTransactionsdisabledallRecord a stack trace for every begin and commit, to find an unbalanced transaction.

These only show when the debug output is on for your address. See Finding slow queries.

SQLite keys

KeyShipped defaultMeaning
SQLitePragmas[]emptyPRAGMAs over the driver's defaults, one name=value per entry.
SQLiteTransactionWait25Seconds a transaction waits for the writers ahead of it. Keep it below the web server's request timeout.
SQLiteCLITransactionWait300The same on the command line (cronjobs, imports, scripts).
SQLiteBusyTimeout5000Milliseconds a single statement waits for another write in a web request.
SQLiteCLIBusyTimeout30000The same on the command line.

Details: SQLite: the write queue and locking and SQLite maintenance.

Driver aliases

ImplementationAlias[] maps the value of DatabaseImplementation to a class. Shipped: mysql, mysqli, ezmysql, ezmysqli to eZMySQLiDB; postgresql, ezpostgresql, pgsql to eZPostgreSQLDB; sqlite3 to eZSQLite3DB; mongodb to expMongoDB. The ezoracle extension adds ezoracle and oracle. An extension can add more aliases from its own site.ini.append.php.

Keys outside this block

SettingWhereMeaning
Oracle-only keys OracleEmptyStringForNull, OracleCaseInsensitive, OracleCaseInsensitiveSortsite.ini [DatabaseSettings], read by ezoracleSee Setting up Oracle
Connection pooling, retries, tracing for Oracleezoracle.iniSee Oracle: persistent connections, DRCP and tuning
The SQL query cachequerycache.ini [QueryCacheSettings]See The SQL query cache
The DFS cluster metadata databasefile.ini [eZDFSClusteringSettings]See Clustering: DFS and its metadata database
Sessions in the databasesite.ini [Session] HandlerSee Sessions in the database

Minimal blocks per engine

# SQLite 3
[DatabaseSettings]
DatabaseImplementation=sqlite3
Database=exponential.db

# PostgreSQL
[DatabaseSettings]
DatabaseImplementation=ezpostgresql
Server=localhost
Port=5432
User=exponential
Password=<the password>
Database=exponential

# MariaDB and MySQL
[DatabaseSettings]
DatabaseImplementation=ezmysqli
Server=localhost
User=exponential
Password=<the password>
Database=exponential
Charset=utf-8

MongoDB and Oracle blocks are on Setting up MongoDB and Setting up Oracle. The placeholder values are examples; use your own and never commit the override file.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

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