Linux 为什么我会收到“无法进行二进制日志记录”。在我的 MySQL 服务器上?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9665535/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 05:06:54  来源:igfitidea点击:

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

mysqllinuxvirtualboxtoad

提问by Steven

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

当我今天启动我的 MySQL 服务器并尝试使用Toad for Mysql进行一些更改时,我收到以下消息:

MySQL Database Error

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

MySQL 数据库错误

无法进行二进制日志记录。消息:InnoDB 中的事务级别“READ-COMMITTED”对于二进制日志模式“STATEMENT”不安全

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

我不知道这是什么意思。我正在使用 Ubuntu 11.x 在 VirtualBox 上运行 Mysql。

Has anyone run into this problem before?

有没有人遇到过这个问题?

采纳答案by Vikram

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

根据ERROR 1598 (HY000): Binary Logging not possible。消息:InnoDB 中的事务级别 READ-COMMITTED 对于 Binlog 模式 STATEMENT 不安全

There are several solutions for the issue:

  • You need to change the binlog mode to either ROWor MIXEDin 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-binfrom the command options for the mysqld utility starting the MySQL server.

该问题有几种解决方案:

  • 您需要将 binlog 模式更改为ROWMIXED,以便将数据加载到数据库中

    mysql> SET GLOBAL binlog_format = 'ROW';
    
  • 如果您不打算使用 MySQL 服务器进行复制,请考虑通过--log-bin从启动 MySQL 服务器的 mysqld 实用程序的命令选项中删除该选项来关闭二进制日志记录。