使用mysql批量更新或批量删除的大事务时可能会出现以下错误
Multi-statement transaction required more than ‘max_binlog_cache_size’ bytes of storage; increase this mysqld variable and try again
这是由于更新和删除的大事务会写入大量binlog,可能会造成binlog cache过小而导致执行失败。也会遇到主库执行成功而从库不同步的情况。这是因为虽然主从的max_binlog_cache_size参数虽然设置的一样,但是实际使用的binlog cache不一定相同,从而导致binlog cache因为过小而主从复制中断。

mysql> show variables like 'max_binlog_cache_size';
+-----------------------+-----------+
| Variable_name         | Value     |
+-----------------------+-----------+
| max_binlog_cache_size | 134217728 |
+-----------------------+-----------+

查看该参数设置为134217728B,即128MB

mysql> set global max_binlog_cache_size=268435456;
Query OK, 0 rows affected (0.05 sec)

主从的参数都设置为256MB,并将参数文件/etc/my.cnf中的max_binlog_cache_size也更改防止重启失效,最后start slave启动主从复制即可。

Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage导致主从不同步解决方法相关推荐

  1. Last_Error: Slave SQL thread retried transaction 10 time(s) in vain, giving up导致主从不同步的解决方法

    mysql版本:5.6.34 在主库上做了大事务的delete,从库报Last_Error: Slave SQL thread retried transaction 10 time(s) in va ...

  2. mysql 执行报错及解决方法 Multi-statement transaction required more than ‘max_binlog_cache_size‘

    mysql数据库执行update语句,报错. 导入数据库的时候报了一个错: Multi-statement transaction required more than 'max_binlog_cac ...

  3. linux qemu 报错 Unable to reserve 0xfffff000 bytes of virtual address space at 0x1000 解决方法

    目录 错误现象 可能原因 解决过程 解决方法 错误现象 使用 qemu-i686 运行 i686平台文件 报错 qemu-i686: Unable to reserve 0xfffff000 byte ...

  4. error: Microsoft Visual C++ 14.0 is required. Get it with Microsoft Visual C++ Build安装scrapy出错解决方法

    安装scrapy出现如下错误: error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ ...

  5. docker 容器中yum网速慢报错 Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds 解决方法

    目录 方法一:添加阿里云镜像 方法二:修改 docker-ce.repo 中 docker-ce-stable 镜像为阿里云 其他说明:官方源添加方法 方法一:添加阿里云镜像 yum-config-m ...

  6. TypeError: expected str, bytes or os.PathLike object, not int(解决方法)

    在使用 pip 安装软件时,报错如下 $ pip install numpy Exception: Traceback (most recent call last):   File "/u ...

  7. Creating index ‘PRIMARY‘ required more than ‘innodb_online_alter_log_max_size‘ bytes of

    在释放一个数亿记录的表时报该错Creating index 'PRIMARY' required more than 'innodb_online_alter_log_max_size' bytes ...

  8. pandas read_csv ‘utf-8‘ codec can‘t decode bytes in position 1198-1199: invalid continuation byte解决

    pandas read_csv 'utf-8' codec can't decode bytes in position 1198-1199: invalid continuation byte解决 ...

  9. Microsoft Visual C++ 14.0 is required解决方法

    在用python调用别的语言(我用的是cache数据库)的方法时,在执行"python setup3.py install"方法时出现"error: Microsoft ...

最新文章

  1. 眼耳鼻舌身意,严肃地聊一聊元宇宙的“技术拼图”
  2. 函数声明与函数表达式
  3. 用verilog语言写的任意整数的分频器
  4. poj 1195(二维树状数组)
  5. 「 每日一练,快乐水题 」540. 有序数组中的单一元素
  6. 剑指Offer-LeetCode刷题
  7. 排序算法入门之冒泡排序优化
  8. 智慧屏用鸿蒙的生态,紧随鸿蒙OS手机版 ,智慧屏为什么对鸿蒙生态这么重要?...
  9. 织梦CMS内核宝宝算命取名企业模板
  10. python collections,函数等笔记
  11. ggplot2作图详解:映射(mapping)
  12. FPGA开发设计流程
  13. Qt 动图 播放png阵列 避免使用gif导致失真
  14. Tableau如何动态显示销售数据排名
  15. 怎么使用svn下载到本地
  16. excel多元线性拟合_多元线性回归EXCEL图表
  17. Spring Data ElasticSearch - 分布式搜索和数据分析引擎 相关操作实战流程
  18. [样本分析] 海莲花CS样本
  19. vSphere虚拟网络02 - 虚拟交换机
  20. 【C语言学习笔记】《C程序设计语言》读后感

热门文章

  1. 免签约微信支付宝个人收款接口pxpay v2.0.4
  2. 自适应数字墙星系网站404页面源码
  3. c语言中通过指针引用数组,C语言基础(二)
  4. 帝国CMS默认编辑器插入代码插件
  5. Jn建站系统2.0源码 附视频安装教程
  6. 怎样直接在列表修改数据html,谈谈yii2-GridView如何实现列表页直接修改数据
  7. 小程序,修改数组或对象中的值,通过input动态修改数组对象中的值
  8. 计算机网络中seq,计算机网络A卷及参考答案
  9. Spring Cloud微服务之Feign服务调用(十一)
  10. 数据访问层代码自动生成