Dependency-Track logo Dependency-Track

Dependency-Track includes an embedded H2 database enabled by default. The intended purpose of this database is for quick evaluation, testing, and demonstration of the platform and its capabilities.

The embedded H2 database is not intended for production use.

Dependency-Track supports the following database servers:

To change database settings, edit application.properties found in the Dependency-Track data directory.

Microsoft SQL Server Example

alpine.database.mode=external
alpine.database.url=jdbc:sqlserver://localhost:1433;databaseName=dtrack
alpine.database.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
alpine.database.driver.path=~/path/to/sqljdbc4.jar
alpine.database.username=dtrack
alpine.database.password=password

MySQL Example

alpine.database.mode=external
alpine.database.url=jdbc:mysql://localhost:3306/dtrack?autoReconnect=true&useSSL=false
alpine.database.driver=com.mysql.jdbc.Driver
alpine.database.driver.path=~/path/to/mysql-connector-java-5.1.45-bin.jar
alpine.database.username=dtrack
alpine.database.password=password

For MySQL, it is necessary to remove ‘NO_ZERO_IN_DATE’ and ‘NO_ZERO_DATE’ from the sql-mode prior to creating the Dependency-Track database. It’s also necessary to add ‘ANSI_QUOTES’ to the sql-mode. Refer to the MySQL documentation for details.

There are several ways to change this configuration, however the recommended way is to modify the MySQL configuration (typically my.ini or similar) with the following:

[mysqld] 
sql_mode="ANSI_QUOTES,STRICT_TRANS_TABLES,ONLY_FULL_GROUP_BY,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

MySQL will erroneously report index key length violations (“Specified key was too long”), when infact the multi-byte key length is lower than the actual value. If UTF-8 support is required, do not use MySQL.

PostgreSQL Example

alpine.database.mode=external
alpine.database.url=jdbc:postgresql://localhost:5432/dtrack
alpine.database.driver=org.postgresql.Driver
alpine.database.driver.path=~/path/to/postgresql-42.2.1.jar
alpine.database.username=dtrack
alpine.database.password=password