MariaDB
Default Credentials
Section titled “Default Credentials”| Variable | Value |
|---|---|
MARIADB_ROOT_PASSWORD | root |
Connection
Section titled “Connection”From inside a project container (using the network alias):
mysql -h mariadb -u root -prootFrom the host machine (via the exposed port):
mysql -h 127.0.0.1 -P 3306 -u root -prootAutomatic DATABASE_URL
Section titled “Automatic DATABASE_URL”When a project’s docker-compose.yml contains a mariadb service, dde automatically injects a DATABASE_URL environment variable into the primary service. The database name is derived from the project name (hyphens replaced with underscores).
The variable is only added if:
- It is not already defined in the service’s environment
- It is not defined in the project’s
.envor.env.devfiles
Data Persistence
Section titled “Data Persistence”Data survives container restarts and dde updates. Each version has its own isolated data directory.
Configuration
Section titled “Configuration”Declare in .dde/config.yml:
services: - name: mariadbOr with an explicit version:
services: - name: mariadb version: "10.6"See custom-versions.md for details on running non-default versions.