Artifactory MySQL Configuration
Copy the MySQL JDBC driver to Artifactory's Tomcat lib directory and configure the database connection in system.yaml. Avoid storing artifact BLOBs in MySQL.
-
Download the platform-independent MySQL JDBC driver from the MySQL website and copy the
mysql-connector-j-<version>.jarfile 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 -
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, you can store BLOBs inside MySQL if the typical BLOB size is relatively small. Storing large BLOBs in MySQL can cause memory issues because MySQL buffers BLOBs rather than streaming them (see MySQL Bug #15089) and can result in
OutOfMemoryerrors 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_packetto a value higher than the maximum artifact size you store in Artifactory.
Updated 7 days ago