JIRA Unable to Update MySQL

Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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 exception is thrown when editing JIRA:

java.sql.SQLException: The MySQL server is running with the --read-only option so it cannot execute this statement
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2975)
	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1600)
	at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1129)

Cause

The MySQL server is running with read-only permission, therefore it can't execute add or update queries.

Resolution

  1. Verify the name of the user and password in <jira-install>/conf/server.xml is correct.
  2. Ensure that the user has permission to connect to the database, and permission to create and populate tables as per our Connecting JIRA to MySQL documentation:

    GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX on <JIRADB>.* TO '<USERNAME>'@'<JIRA_SERVER_HOSTNAME>' IDENTIFIED BY '<PASSWORD>';
    flush privileges;
    

    (info) If, after granting the proper permissions for the user, the above error is still experienced, please modify the database password so that it does not use special characters, as this is a known bug tracked in JRASERVER-27796 - Cannot use special characters in the database password

Last modified on Mar 7, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.