I got an error message last week, it said:
mysql failed with exit code 1 - output follows:
ERROR 1598 (HY000) at line 16: Binary logging not possible. Message: Transaction level 'READ-UNCOMMITTED' in InnoDB is not safe for binlog mode 'STATEMENT'
As it's not my first time to see such error, it's worth for me to list a quick solution here.
According to MySQL Reference Manual 5.2.4.2. Setting The Binary Log Format, there're three formats that supported by MySQL:- STATEMENT causes logging to be statement-based.
- ROW causes logging to be row-based.
- MIXED causes logging to use mixed format.
What we need to do is to change the binlog_format to MIXED or ROW in MySQL. It can be archived by either editing your config file or by "SET GLOBAL":
Code:
mysql> show variables like 'binlog_for%';
+---------------+-----------+
| Variable_name | Value |
+---------------+-----------+
| binlog_format | STATEMENT |
+---------------+-----------+
1 row in set (0.00 sec)
mysql> SET GLOBAL binlog_format = 'MIXED';
Query OK, 0 rows affected (0.00 sec)
mysql> Ctrl-C -- exit!
The line for configuration:
Code:
admon:/home/tmp# grep binlog_format /etc/mysql/my.cnf
binlog_format = 'MIXED'