JIRA Unable to Update MySQL

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 - Cannot use special characters in the database password Resolved

Was this helpful?

Thanks for your feedback!

Why was this unhelpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport