Artifactory MariaDB Database Creation

Run the createdb_mariadb.sql script to create the MariaDB database, grant Artifactory privileges, and apply a case-sensitive utf8_bin collation.

Artifactory provides a script that executes the SQL commands needed to create your MariaDB database.

The script is located at $JFROG_HOME/artifactory/app/misc/db/createdb/createdb_mariadb.sql.

Review the script and modify it as needed for your environment.

createdb_mariadb.sql Script

CREATE DATABASE artdb CHARACTER SET utf8 COLLATE utf8_bin;
GRANT ALL on artdb.* TO 'artifactory'@'%' IDENTIFIED BY 'password';
GRANT SUPER ON *.* TO 'artifactory'@'%';
FLUSH PRIVILEGES;

After verifying that the script is correct, run it to create the database and proceed with configuring the database.

If you are running a MariaDB database in a Docker container, use the following script.

CREATE DATABASE artdb CHARACTER SET utf8 COLLATE utf8_bin;
GRANT ALL on artdb.* TO 'artifactory'@'%' IDENTIFIED BY 'password';
GRANT SUPER ON *.* TO 'artifactory'@'%';
FLUSH PRIVILEGES;
⚠️

Selecting a Case-Sensitive Collation

While MariaDB Database Server is not case-sensitive by default, select a case-sensitive collation because Artifactory is case-sensitive.

For example, in the createdb.sql script above COLLATE is set to "utf8_bin".

📘

Artifactory privileges

We recommend providing Artifactory with full privileges on the database.