Skip to main content
Jamf Nation, hosted by Jamf, is the largest Apple IT management community in the world. Dialog with your fellow IT professionals, gain insight about Apple device deployments, share best practices and bounce ideas off each other. Join the conversation.

Creating the Jamf Pro Database Using the Jamf Pro Server Tools Command-Line Interface


This article explains how to create the Jamf Pro database using the Jamf Pro Server Tools Command-Line Interface. The Jamf Pro web application requires the Jamf Pro database for storing its data and credentials for a user that has full access to that database.

MySQL is the database subsystem used by Jamf Pro. MySQL can be a local instance, residing on the same server as Jamf Pro, or MySQL can reside on a different server. While there are various methods for connecting to MySQL to perform the following tasks, the process described here is for connecting locally to the mysql command line on the same server on which MySQL is installed.


MySQL should already be installed and running on the target server. For more information, see the Installing Java and MySQL Knowledge Base article.


Creating the Jamf Pro database involves the following steps:

  1. Create the Jamf Pro database and user
  2. Configure MySQL
  3. Start Up Jamf Pro

Step 1. Create the Jamf Pro Database and User

  1. Execute the following command from a terminal or command prompt:
    jamf-pro database init
  2. When prompted, enter your MySQL root password. Note: If you had previously used a temporary root password, an option will appear to set the root password. Press Enter to skip this option.
  3. Enter the name for Jamf Pro database that you want to use (for example, “jamfsoftware").
  4. Enter the username for the database. If you enter a new username, it will be created.
  5. Enter a new, strong user password. Note: If you forget to enter the password, you can run the CLI again. When you enter the old username, the password will be reset.
  6. A database connection test will run. Press "Y" if you want to save the username and password to the configuration file.
  7. To view the completed list of settings, execute the following command:
    jamf-pro config list

Step 2. Configure MySQL

  1. Set the value of the innodb_buffer_pool_size to an appropriate value for your server by executing the following command:
    jamf-pro database config set --innodb-buffer-pool-size <size>
    The <size> value is the total amount of memory that MySQL will use on the server. This should be approximately 70% of the server's total available memory. At a minimum, a value larger than the largest table size in the database is recommended. Table sizes will vary based on the number of enrolled devices and log flushing frequency. The value for this variable uses a single character to specify the unit of measure for the numeric value. Decimal values are not supported. For example:
    • "16G" is equal to 16 Gigabytes
    • "4096M" is equal to 4096 Megabytes or 4 Gigabytes. Note: Ensure that enough memory is left available for the operating system of the server. Different operating systems have different memory requirements.
  2. Set the innodb_file_per_table value to 1 by executing the following command:
    jamf-pro database config set --innodb-file-per-table 1
  3. Execute the following command to restart MySQL:
    jamf-pro database restart

Step 3. Start Up Jamf Pro

After installing Jamf Pro on the server, your first navigation to the Jamf Pro web application should display the "Database Connection Error" dialog.

Click the Edit Connection button and change any of the default information to the custom values that you used during the creation of the Jamf Pro database and database access user. This should, at least, include the password.

Note: You can avoid this step on staging and testing servers by using the database name, username, and password that you had defined earlier (e.g., jamfsoftware, jamfsoftware@localhost, and jamfsw03). However, these examples should not be used for production systems containing user data.

Warning: Be especially cognizant of the need to use secure credentials to meet GDPR regulations if you are doing things like restoring a production database backup to a "testing" Jamf Pro instance.

Additional Information

For instructions on creating the Jamf Pro database manually, see the Manually Creating the Jamf Pro Database Knowledge Base article.

Like Comment