Confluence will not start using MySQL 5.1.5+ with STATEMENT binary logging
Problem
Confluence installation will not start properly when it's using MySQL 5.1.5+ with InnoDB and the default binary logging format - i.e. 'STATEMENT'
Diagnosis
The following appears in the atlassian-confluence.log
:
Binary logging not possible. Message: Transaction level 'READ-COMMITTED' in InnoDB is not safe for binlog mode 'STATEMENT'
or:
2012-07-26 04:28:24,589 ERROR [http-80-1] [sf.hibernate.util.JDBCExceptionReporter] logExceptions Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.
Cause
Confluence uses the 'READ-COMMITTED' transaction isolation level with MySQL, which currently only supports row-based binary logging. For more information about this, please refer to MySQL Bug #40360.
Resolution
To fix this problem, you must configure MySQL's binary logging format to use 'row-based' binary logging:
- Shutdown Confluence and your MySQL database
- Open the MySQL configuration file (
my.cnf
) in a text editor
On UNIX-based systems, this file may be located in the/etc
directory Locate the
binlog_format
property in this file in the[mysqld]
section and ensure that its value isrow
, such that you end up with:binlog_format=row
- Save your changes to this file
- Restart Confluence and your MySQL database