mysql报错Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage

在执行create table  xx  as  select xx的时候

或者在执行

tpcc-mysql的tpcc_load 的时候

都会遇到这个错误

1534, HY000, Writing one row to the row-based binary log failed
Retrying ...

1197, HY000, Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again
Retrying ...

因为使用的是腾讯云主机,1核1G内存,内存不足导致的binlog cache size不够不能写入binlog,导致语句无法执行

解决办法:

修改my.cnf,增大binlog_cache_size和max_binlog_cache_size参数的值

binlog_cache_size = 20M
max_binlog_cache_size = 100M


今天备份表数据遇到一个错误  Error CODE: 1197 Multi-statement TRANSACTION required more THAN 'max_binlog_cache_size' bytes of STORAGE

版本:mysql5.6.35

系统:centos6.5

下面是备份语句

CREATE TABLE FONTANA_BETSBAK AS SELECT * FROM FONTANA_BETS; 
Error CODE: 1197
Multi-statement TRANSACTION required more THAN 'max_binlog_cache_size' bytes of STORAGE; increase this mysqld variable AND try again

上网搜了一下,发现是max_binlog_cache_size设置得不够大的原因

对Innodb引擎
由于innodb是事务型的,所以会把load文件的整个操作当作一个事务来处理,
中途中断load操作,会导致回滚。 
与此相关的一些参数:
max_binlog_cache_size----能够使用的最大cache内存大小。
当执行多语句事务时,max_binlog_cache_size如果不够大,
系统可能会报出“Multi-statement
transaction required more than 'max_binlog_cache_size' bytes of storage”的错误。
 备注:以load data 来说,如果load的文件大小为512M,在执行load 的过程中,
所有产生的binlog会先写入binlog_cache_size,直到load data 的操作结束后,
最后,再由binlog_cache_size 写入二进制日志,如mysql-bin.0000008等。
所以此参数的大小必须大于所要load 的文件的大小,或者当前所要进行的事务操作的大小。

改大max_binlog_cache_size 和binlog_cache_size  问题解决

SET GLOBAL max_binlog_cache_size =;
SET GLOBAL binlog_cache_size =;

mysql报错Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage的更多相关文章

  1. Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again

    WARN: SQL Error: , SQLState: HY000 八月 , :: 下午 org.hibernate.engine.jdbc.spi.SqlExceptionHelper logEx ...

  2. Mysql报错合集

    目录 一.链接报错 客户端连接mysql出错 链接客户端出错 交互登陆mysql出现warning警告Using a password 导入数据到数据库报错ERROR 1050 登陆数据库提示-bas ...

  3. MySQL报错解决:The MySQL server is running with the --read-only option so it cannot execute this statement

    MySQL报错:The MySQL server is running with the --skip-grant-tables option so it cannot execute this st ...

  4. 安装mysql报错

    原文链接:https://blog.csdn.net/bao19901210/article/details/51917641 二进制安装 1.添加mysql组和mysql用户,用于设置mysql安装 ...

  5. 【Problem】xampp in ubuntu下命令行启动mysql报错: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/opt/lampp/var/mysql/mysql.sock' (2)

    xampp in ubuntu下命令行启动mysql报错: reddevil@reddevil-Lenovo:/opt/lampp$ ./bin/mysql -u root -p Enter pass ...

  6. MySQL 报错:Translating SQLException with SQL state '42000', error code '1064', message

    MySQL报错详细日志 2019-09-12 16:42:29 [http-nio-80-exec-25] DEBUG [org.springframework.jdbc.support.SQLErr ...

  7. PHP连接MySQL报错:SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket 'MySQL' (2)

    如下所示,PHP连接MySQL报错: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket 'MySQL' ...

  8. Asp.Net连接Mysql报错Out of sync with server

    Asp.Net连接Mysql报错Out of sync with server 原因:程序引用的MySql.Data.dll版本高于服务器版本 解决:下载一个低版本的MySql.Data.dll,项目 ...

  9. Linux系统下启动MySQL报错:Neither host 'localhost.localdomain' nor 'localhost' could be looked up with

    Linux系统下启动MySQL报错:Neither host 'localhost.localdomain' nor 'localhost' could be looked up with 摘要 Li ...

随机推荐

  1. ThinkingInJava 学习 之 0000001 一切都是对象

    -- -- -- -- -- -- -- -- -- 大杂烩 -- Java内存布局[图]以及java各种存储区[详解] -- -- -- -- -- -- -- -- -- 1. 用引用操纵对象 在 ...

  2. akka cluster singleton

    cluster singleton 需要注意的一点是 ClusterSingletonProxy 必须和 ClusterSingletonManager 一起工作 尝试过通过 path 来获得 sin ...

  3. iOS shell脚本打包

    原文链接:http://www.jianshu.com/p/5abbe0d61cef 参考链接:http://blog.csdn.net/potato512/article/details/52176 ...

  4. 配置openssh实现sftp远程文件上传

    客服端:winscp等ftp/sftp客户端 服务器:阿里云默认使用的openssh 需求:可以sftp远程传输文件到服务器固定文件夹下,不可远程ssh登录 步骤: 1. 建立系统用户ftpuser及 ...

  5. Xlight FTP搭建FTP服务器教程

    Xlight FTP搭建FTP服务器教程 1. 服务器公共设置 设置FTP 端口, ip 等 FTP 服务器公共的设定 2. 设定 FTP 用户, FTP 目录 等信息    备注: 这个用户是非Wi ...

  6. js - 常用功能方法汇总(updating...)

    一.查值的类型(可用于拷贝) /* * @Author: guojufeng@ * @Date: 2017-12-20 15:07:06 * @purpose 获取一个值的类型 * @param {v ...

  7. 重写 Ext.form.field 扩展功能

    直接代码,放项目overrides文件夹中即可 //重写类 表单父类 //支持allowBlank动态绑定 Ext.define("override.form.field.Base" ...

  8. Django之ORM版学员管理系统

    班级表 表结构 class Class(models.Model): id = models.AutoField(primary_key=True) # 主键 cname = models.CharF ...

  9. day_6.26 反射

    #utf-8 #2018-6-26 17:58:36 #反射,, 应用:从类里面获取字符串 #在python中万物皆对象 class Teacher: dic = {"查看学生信息" ...

  10. 使用 AJAX + 三级联动 实现分类出全国各地的省,市,区

    使用AJAX + 三级联动  实现分类出全国各地的省,市,区 也可以将下面的显示页面所写的 function循环,封装成js文件,就是在写代码软件里创建一个js文件,就和创建一个HTML或php文件一 ...