JIRA Throws an Exception due to MySQL Error 13

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 error appears in the logs when starting JIRA:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2012-12-10 12:50:30,622 http-bio-8080-exec-3 ERROR couch.potato 770x4174x1 1742hx 192.168.175.250 /rest/greenhopper/1.0/xboard/issue/update-field.json [event.listeners.search.IssueIndexListener] Error re-indexing changes for issue 'TV-943' com.atlassian.jira.exception.DataAccessException: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT CG.ID, CG.issueid, CG.AUTHOR, CG.CREATED, CI.ID, CI.groupid, CI.FIELDTYPE, CI.FIELD, CI.OLDVALUE, CI.OLDSTRING, CI.NEWVALUE, CI.NEWSTRING FROM changegroup CG INNER JOIN changeitem CI ON CG.ID = CI.groupid WHERE CG.issueid=? ORDER BY CG.CREATED ASC, CI.ID ASC (Can't create/write to file '/tmp/#sql_11bd_0.MYI' (Errcode: 13)) at com.atlassian.jira.ofbiz.DefaultOfBizDelegator.findByAnd(DefaultOfBizDelegator.java:107) at com.atlassian.jira.issue.changehistory.DefaultChangeHistoryManager.getAllChangeItems(DefaultChangeHistoryManager.java:129) at com.atlassian.jira.issue.index.DefaultChangeHistoryRetriever.get(DefaultChangeHistoryRetriever.java:53) at com.atlassian.jira.issue.index.DefaultChangeHistoryRetriever.get(DefaultChangeHistoryRetriever.java:30) at com.atlassian.jira.issue.index.DefaultIssueIndexer$ChangeHistoryDocumentBuilder.get(DefaultIssueIndexer.java:567) at com.atlassian.jira.issue.index.DefaultIssueIndexer$IssueLockDocumentCreationStrategy$2.get(DefaultIssueIndexer.java:597) at com.atlassian.jira.issue.index.DefaultIssueIndexer$IssueLockDocumentCreationStrategy$2.get(DefaultIssueIndexer.java:593) at com.atlassian.util.concurrent.ManagedLocks$ManagedLockImpl.withLock(ManagedLocks.java:315) at com.atlassian.jira.issue.index.DefaultIssueIndexer$IssueLockDocumentCreationStrategy.get(DefaultIssueIndexer.java:592) at com.atlassian.jira.issue.index.DefaultIssueIndexer$2.perform(DefaultIssueIndexer.java:158) at com.atlassian.jira.issue.index.DefaultIssueIndexer$4$1.get(DefaultIssueIndexer.java:284) at com.atlassian.jira.issue.index.DefaultIssueIndexer$4$1.get(DefaultIssueIndexer.java:280) ... Caused by: org.ofbiz.core.entity.GenericDataSourceException: SQL Exception while executing the following:SELECT CG.ID, CG.issueid, CG.AUTHOR, CG.CREATED, CI.ID, CI.groupid, CI.FIELDTYPE, CI.FIELD, CI.OLDVALUE, CI.OLDSTRING, CI.NEWVALUE, CI.NEWSTRING FROM changegroup CG INNER JOIN changeitem CI ON CG.ID = CI.groupid WHERE CG.issueid=? ORDER BY CG.CREATED ASC, CI.ID ASC (Can't create/write to file '/tmp/#sql_11bd_0.MYI' (Errcode: 13)) at org.ofbiz.core.entity.jdbc.SQLProcessor.executeQuery(SQLProcessor.java:605) at org.ofbiz.core.entity.GenericDAO.selectListIteratorByCondition(GenericDAO.java:1061) at org.ofbiz.core.entity.GenericDAO.selectByAnd(GenericDAO.java:608) at org.ofbiz.core.entity.GenericHelperDAO.findByAnd(GenericHelperDAO.java:131) at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:788) <+2> at java.lang.reflect.Method.invoke(Unknown Source)

Cause

MySQL cannot create a temporary file for the result set in the temporary directory. This may be caused by Anti-virus MySQL from creating temporary files (.MYI files).

Resolution

Refer to the official MySQL documentation for information on how to fix this.

ℹ️ It may require setting an exception for that directory in Anti-virus.

Updated on April 7, 2025

Still need help?

The Atlassian Community is here for you.