Jamf Pro uses MySQL user information in the DataBase.xml file to login to MySQL. If the DataBase.xml file's MySQL user credentials are incorrect, a database connection error will occur. Follow these steps to verify and resolve this issue.
- Log in to the server hosting Tomcat.
- Locate the DataBase.xml file, stored in one of the following locations:
Linux: /usr/local/jss/tomcat/webapps/ROOT/WEB-INF/xml/DataBase.xml
Windows: C:\Program Files\JSS\Tomcat\webapps\ROOT\WEB-INF\XML\DataBase.xml
- Open the DataBase.xml file in a plain text editor and locate the following lines:
<DataBaseUser>database_username</DataBaseUser> <DataBasePassword>database_password</DataBasePassword>These values are the MySQL user credentials Jamf Pro is using to attempt to access the Jamf Pro database.
- Verify that the credentials in the DataBase.xml file are valid by using them to attempt to log in to MySQL. On the database server, access the MySQL command line and log in with the user details identified in the previous step by executing one of the following:
- Linux and Mac:
mysql -u database_username -pNote:Replace
database_usernamein the above example with the database username identified in step 3. - Windows:
mysql.exe -u database_username -pNote:Replace
database_usernamein the above example with the database username identified in step 3.
- If the login succeeds, you will see the MySQL command prompt:
mysql>. This means that the MySQL user credentials contained in the DataBase.xml file are valid, and this is not your issue. Refer to the next possible issue in this article to continue troubleshooting. - If the login fails, this indicates that the saved password for the database user is incorrect and needs to be changed. Continue following these steps to resolve.
- Change the password of the Jamf Pro database user. For instructions, see the "Changing the Password for the Jamf Pro MySQL Database" section of the Changing Specific Accounts in Jamf Pro and the MySQL Database article.
- Edit the DataBase.xml file to reflect the newly changed MySQL user credentials details. Save the changes to the file.
- Restart Tomcat. For more information, see the Starting and Stopping Tomcat article.
- Reattempt connection to the database. If the database connection error persists, refer to the next possible issue in this article to continue troubleshooting.