The Database User is Not Granted Proper Privileges to the Database

Technical Articles

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

During startup, Jamf Pro logs in to MySQL as a specific database user. If the database user does not have proper permissions to access the Jamf Pro database, Jamf Pro will not be able to establish a connection and a database connection error will occur. Follow these steps to verify and resolve this issue.

  1. Log in to MySQL as the "root" user by executing one of the following:
    • Linux:
      $mysql -u root -h localhost -p
    • Windows:
      mysql.exe -h localhost --user=root -p
  2. Execute the following command:
    SHOW GRANTS for 'database_username'@'localhost';
    Note:

    Replace 'database_username'@'localhost' in the above example with your database username. in the above example with your database username.

    The command returns grant statements that have been made for the logged in database user, such as the following:
    GRANT ALL PRIVILEGES ON .database_name.* TO 'database_username'@'localhost'
  3. Verify that the database user has proper privileges to the database.
    1. If the command returns a grant statement similar to the above example, this indicates the Jamf Pro database user has proper privileges to the Jamf Pro database. To continue troubleshooting the database connection error, contact Jamf Support.
    2. If the command does not return a grant statement similar to the above example, this indicates that the Jamf Pro user does not have proper permissions to the database. Continue following these steps to resolve.
  4. Execute the following command:
    GRANT ALL ON database_name.* TO 'database_username'@'localhost';
    Note:

    Replace database_name and 'database_username' with the database name and database username specific to your environment.

    Or, in the case of MySQL and Jamf Pro installed on different servers, execute something similar to the following:
    GRANT ALL ON database_name.* TO 'database_username'@'123.456.78.910';
    Note:

    Replace database_name and 'database_username'@'123.456.78.910' with the database name and database username specific to your environment.

  5. On the Jamf Pro server, reattempt the connection to the database.