JIRA Unable to Update MySQL

Still need help?

The Atlassian Community is here for you.

Ask the community

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 the read only permission, therefore it cannot 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 JRA-27796 - Getting issue details... STATUS

Last modified on Mar 30, 2016

Was this helpful?

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