JIRA Unable to Update MySQL

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 exception is thrown when editing JIRA:

1 2 3 4 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:

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

    ℹ️ 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

Updated on April 15, 2025

Still need help?

The Atlassian Community is here for you.