Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do I get 'Binary logging not possible.' on my MySQL server?

When I started up my MySQL server today and try to do some changes using Toad for Mysql, I get this message:

MySQL Database Error

Binary logging not possible. Message: Transaction level 'READ-COMMITTED' in InnoDB is not safe for binlog mode 'STATEMENT'

I have no idea what this means. I'm running Mysql on VirtualBox with Ubuntu 11.x.

Has anyone run into this problem before?

like image 292
Steven Avatar asked Mar 12 '12 10:03

Steven


People also ask

How do I enable binary logging in MySQL?

From MySQL 8.0, binary logging is enabled by default, whether or not you specify the --log-bin option. The exception is if you use mysqld to initialize the data directory manually by invoking it with the --initialize or --initialize-insecure option, when binary logging is disabled by default.

How do I know if MySQL is enabled by binary logging?

To retrieve a list of all the BinLogs present in your system, make use of the following command: mysql> SHOW BINARY LOGS; This command will display a list of all binary logs present in the system only when the binary log is enabled otherwise, it gives an error.

What is MySQL binary logging?

The MySQL Binary Log origin generates one record for each transaction recorded in the binary logs. The record includes fields and record header attributes that contain the operation type, the change data capture information, and the changed data, as well as information about the primary key when applicable.

Where are binary logs MySQL?

Change the default location of the Binary Logs The MySQL binary logs and index files are saved in the C:\ProgramData\MySQL\MySQL Server 8.0 directory. We can change the default location of the binary logs.


1 Answers

According to ERROR 1598 (HY000): Binary Logging not Possible. Message: Transaction Level READ-COMMITTED in InnoDB is not Safe for Binlog Mode STATEMENT:

There are several solutions for the issue:

  • You need to change the binlog mode to either ROW or MIXED in order to run the load of the data into the database

    mysql> SET GLOBAL binlog_format = 'ROW';
    
  • If you are not planning to use your MySQL server for the replication consider turning the binary logging off by removing the option --log-bin from the command options for the mysqld utility starting the MySQL server.

like image 70
Vikram Avatar answered Sep 30 '22 16:09

Vikram