Skip to content

Use MariaDB (recommended)

MariaDB is the recommended database server for Kitodo.Production; the MariaDB JDBC driver is part of the build. The bundled default configuration, however, points at MySQL, so when using a MariaDB server adjust the Hibernate and Flyway configuration as follows.

If you prefer MySQL, you can keep the shipped defaults (jdbc:mysql://... URL and the com.mysql.cj.jdbc.Driver driver); in that case make sure the database, user and passwords in hibernate.cfg.xml and flyway.properties match your MySQL server.

Hibernate configuration

Modifications must be made in hibernate.cfg.xml.

hibernate.connection.url

Instead of jdbc:mysql://... use:

jdbc:mariadb://localhost/kitodo

hibernate.connection.driver_class

Optional. The driver class is detected from the connection URL in most cases; when it is set explicitly, use org.mariadb.jdbc.Driver instead of com.mysql.cj.jdbc.Driver.

hibernate.dialect

Optional. Hibernate detects the dialect from the database connection in most cases. If you need to set it explicitly, use org.hibernate.dialect.MariaDBDialect (see the Hibernate docs on dialects).

Flyway configuration

Only needed if you want to migrate your database with the help of Flyway. Modifications must be made in flyway.properties (see Kitodo-DataManagement/src/main/resources/db/config/flyway.properties).

flyway.url

Instead of jdbc:mysql://... use jdbc:mariadb://....