Migrating JIRA to another database throws database permission denied error
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Symptoms
The following appears in the atlassian-jira.log
:
1
2
3
4
5
6
JIRA Startup Failed
com.opensymphony.module.propertyset.PropertyImplementationException:
SQL Exception while executing the following:SELECT ID, ENTITY_NAME,
ENTITY_ID, PROPERTY_KEY, propertytype FROM jiraschema.propertyentry
WHERE ENTITY_NAME=? AND ENTITY_ID=? (SELECT command denied to user
'jirauser'@'localhost' for table 'propertyentry')
Cause
Insufficient permission granted to the user of the new database.
Resolution
Grant all permissions to the user in the new database.
1
2
3
CREATE DATABASE jiradb CHARACTER SET utf8 COLLATE utf8_bin;
GRANT ALL PRIVILEGES ON jiradb.* TO 'jirauser'@'localhost' IDENTIFIED
BY 'MyPassword';
ℹ️ This query works for PostgreSQL. If you are using a different database, please refer to the official documentation of the respective database and modify the query accordingly.
Was this helpful?