Configure Artifactory to use MySQL

  1. Download the platform-independent MySQL JDBC driver from the MySQL website
  1. Download the platform-independent MySQL JDBC driver from the MySQL website and copy the mysql-connector-j-<version> .jar file to the following directory. Assign the driver the same permissions as the other files in the directory:

    $JFROG_HOME/artifactory/var/bootstrap/artifactory/tomcat/lib
  2. Adjust the database connection details in the system.yaml configuration file. For example:

    shared:
      database:
        allowNonPostgresql: true
        type: mysql
        driver: com.mysql.cj.jdbc.Driver
        url: jdbc:mysql://<your db url, for example: localhost:3306>/artdb?characterEncoding=UTF-8&elideSetAutoCommits=true&useSSL=false
        username: artifactory
        password: password
⚠️

Storing BLOBs inside MySQL

The recommended configuration stores all artifact information in MySQL while 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 MySQL provided that the typical BLOB size is relatively small. Storing large BLOBs in MySQL can cause memory issues because MySQL 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 MySQL, you must configure the Filestore with the Full-DB and Full-DB-Direct Binary Providers and set max_allowed_packet to a value higher than the maximum artifact size you store in Artifactory.