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

Databases: MySQL, MariaDB, PostgreSQL and SQLite

Which databases a DXP project runs on, how to create each one with the right character set, which to choose for development and production, and how the skeleton's guide converts a running project from one engine to…

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/help/dxp-developers/databases-mysql-postgresql-sqlite.md

On this page

Databases: MySQL, MariaDB, PostgreSQL and SQLite

This page is for developers who choose and prepare the database of a DXP project. The DXP stores content through Doctrine DBAL; the skeleton's guide documents four engines.

Contents

  1. Which engine
  2. Creating the database
  3. Installing the schema
  4. Converting between engines
  5. After a conversion

Which engine

EngineMinimumUse it forNotes
MySQL8.0Productionutf8mb4 with utf8mb4_unicode_520_ci
MariaDB10.3 (10.6 recommended)ProductionSame character set
PostgreSQL14 (16 recommended)ProductionUTF8 encoding
SQLite3.35Development, tests, demos, offline installationsNo server; not for concurrent public use (SQLite for development)

The guide's export path to Oracle is "export only"; Oracle is not an engine you install the DXP on.

Creating the database

MySQL or MariaDB:

CREATE DATABASE exponential CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;
GRANT ALL PRIVILEGES ON exponential.* TO 'your_db_user'@'localhost';
FLUSH PRIVILEGES;

PostgreSQL:

psql -U postgres -c "CREATE DATABASE exponential ENCODING 'UTF8';"

Doctrine can also create it from your settings: php bin/console doctrine:database:create. SQLite needs no step: the install command creates the file.

Then set the database variables in .env.local (Environment variables).

Installing the schema

php bin/console exponential:install exponential-oss

On later updates, apply database changes with Doctrine migrations, not with the install command (Doctrine migrations).

Converting between engines

The skeleton's guide (section 21) converts a running project with free tools only:

FromToTool in the guide
MySQL or MariaDBSQLitemysql2sqlite (MIT) piped from mysqldump
PostgreSQLSQLitepgloader
SQLiteMySQL or MariaDBsqlite3-to-mysql (Python, MIT)
SQLitePostgreSQLpgloader
MySQL or MariaDBPostgreSQLpgloader
PostgreSQLMySQL or MariaDBCSV export per table, schema with pgloader, import
AnyOracleexport only

Example from the guide, MySQL to SQLite:

mysqldump --no-tablespaces --skip-extended-insert --compact \
  -u "$DATABASE_USER" -p"$DATABASE_PASSWORD" -h "$DATABASE_HOST" "$DATABASE_NAME" \
  | ./mysql2sqlite - | sqlite3 var/data_dev.db

Back up the database, var/ and .env.local before you start, and do it in a maintenance window without traffic.

After a conversion

The guide's checklist (section 21g):

  1. Update .env.local with the new database settings.
  2. php bin/console cache:clear (the container caches the connection).
  3. php bin/console doctrine:schema:validate.
  4. php bin/console doctrine:migration:migrate --allow-no-migration.
  5. php bin/console exponential:reindex.
  6. Smoke-test the site and /adminui/.
  7. For SQLite as the target, fix the file permissions.
SymptomCauseFix
"Base table not found"A table was not transferredValidate the schema; read the converter's log
Garbled textCharacter set mismatch at exportExport with --default-character-set=utf8mb4 or CLIENT_ENCODING=UTF8
Image variations return 404Rows missing in the field tableCompare row counts between source and target

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