Artifactory MySQL Database Creation
Run the createdb_mysql.sql script to create the MySQL database with utf8_bin collation, then enable remote connectivity by configuring bind-address.
Artifactory provides a script that executes the SQL commands needed to create your MySQL database. The script is located at $JFROG_HOME/artifactory/app/misc/db/createdb/createdb_mysql.sql.
The default createdb.sql script is shown below. Note the following:
- MySQL database server is not case-sensitive by default, but Artifactory is case-sensitive. Select a case-sensitive collation. The default script specifies
utf8_bin. UTF8MB4 is not supported. We recommend keeping the defaultutf8_bin. - We recommend providing Artifactory with full privileges on the database, as shown in the default script.
CREATE DATABASE artdb CHARACTER SET utf8 COLLATE utf8_bin;
CREATE USER 'artifactory'@'%' IDENTIFIED BY 'password';
GRANT ALL on artdb.* TO 'artifactory'@'%';
FLUSH PRIVILEGES;Review the script and modify it as needed for your environment. Then run it to create the database.
Enable MySQL Connectivity from Remote Servers
The following example shows how to enable MySQL connectivity from remote servers. For your organization's best practices, consult with your security team.
To bind the IP addresses, edit the file /etc/mysql/mysql.conf.d/mysqld.cnf and modify the bind-address parameter. Change the default IP address to a comma-separated list of addresses. To bind to all available IP addresses, set the value to 0.0.0.0.
Restart the MySQL service to save the modifications.
Updated 24 days ago
