Download the platform independent MySQL JDBC driver (available from the MySQL website) and copy the
mysql-connector-java-<version>
.jar
file into $JFROG_HOME/artifactory/var/bootstrap/artifactory/tomcat/lib directory.Permissions
Make sure your driver has the same permissions as the rest of the files in the
$JFROG_HOME/artifactory/var
directory.Adjust the database connection details in the system.yaml.configuration file.
For example
shared: database: allowNonPostgresql: true type: mysql driver: com.mysql.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 suggested (and recommended) configuration stores all artifact information in MySQL 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 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 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.