Configure Artifactory to use MariaDB

JFrog Installation & Setup Documentation

Content Type
Installation & Setup
  1. Download the MariaDB JDBC driver (available from the MariaDB website) and copy the mariadb-java-client-<version>.jar file into $JFROG_HOME/artifactory/var/bootstrap/artifactory/tomcat/lib directory


    Make sure your driver has the same permissions as the rest of the files in the $JFROG_HOME/artifactory/var directory.

  2. Adjust the database connection details in the Artifactory System YAML.

    For example

        allowNonPostgresql: true
        type: mariadb
        driver: org.mariadb.jdbc.Driver
        url: jdbc:mariadb://<your db server url, for example: localhost:3306>/artdb?characterEncoding=UTF-8&elideSetAutoCommits=true&useSSL=false&useMysqlMetadata=true
        username: artifactory
        password: password

Storing BLOBs inside MariaDB

The suggested (and recommended) configuration stores all artifact information in MariaDB while the artifact binary data is stored on the file system (under $JFROG_HOME/artifactory/var/data/artifactory/filestore).

While it is not recommended, it is possible to store BLOBs inside MariaDB provided that the typical BLOB size is relatively small. Storing large BLOBs in MariaDB can cause memory issuesbecause MariaDB buffers BLOBs rather than streaming them (please refer to MySQL Bug #15089) and may result in OutOfMemory errors with large binaries depending on your JVM heap size.

To store BLOBs in MariaDB, you will need to configure the Filestore with the Full-DB and Full-DB-Direct Binary Providers and change max_allowed_packet to be higher than the maximum artifact size you intend to store in Artifactory.