Configuring Multi-Context Jamf Pro Databases

Jamf Pro Installation and Configuration Guide for Windows 11.16.0

Solution
Application
Content Type
Technical Documentation
Utilities & Services
version
11.16.0
ft:locale
en-US
vrm_version
11.16.0

These instructions describe how to create unique databases for separate Jamf Pro web applications. Grant access from the Jamf Pro web applications to the databases by creating unique MySQL accounts.

Note:

Data placeholders are used in these instructions to indicate where to place the actual strings needed for your environment. Replace variables such as username, password, hostname, context, and databasename with unique values when executing the commands.

  1. Create a MySQL database for the first context:
    1. Open the MySQL CLI client and log in as the root user.
    2. Create a database using a unique database name by executing the following command:
      CREATE DATABASE databaseone;
    3. Create a unique MySQL user for the first context by executing a command similar to the following:
      CREATE USER 'usernameone'@'localhost' IDENTIFIED WITH mysql_native_password BY 'passwordone';
  2. Grant access to the first database by executing a command similar to the following:
    GRANT ALL ON databaseone.* TO 'usernameone'@'localhost';
  3. Create a MySQL database for the second context:
    1. Open the MySQL CLI client and log in as the root user.
    2. Check the list of databases that already exist by executing the following command:
      SHOW DATABASES;
    3. Create a database using a unique database name by executing the following command:
      CREATE DATABASE databasetwo;
    4. Create a unique MySQL user for the first context by executing a command similar to the following:
      CREATE USER 'usernametwo'@'localhost' IDENTIFIED WITH mysql_native_password BY 'passwordtwo';
  4. Grant access to the second database by executing a command similar to the following:
    GRANT ALL ON databasetwo.* TO 'usernametwo'@'localhost';
  5. Continue adding databases and users until the number of databases and their corresponding users is equal to the number of Jamf Pro contexts on the Tomcat server.