Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage导致主从不同步解决方法
使用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导致主从不同步解决方法相关推荐
- 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 ...
- mysql 执行报错及解决方法 Multi-statement transaction required more than ‘max_binlog_cache_size‘
mysql数据库执行update语句,报错. 导入数据库的时候报了一个错: Multi-statement transaction required more than 'max_binlog_cac ...
- linux qemu 报错 Unable to reserve 0xfffff000 bytes of virtual address space at 0x1000 解决方法
目录 错误现象 可能原因 解决过程 解决方法 错误现象 使用 qemu-i686 运行 i686平台文件 报错 qemu-i686: Unable to reserve 0xfffff000 byte ...
- 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++ ...
- docker 容器中yum网速慢报错 Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds 解决方法
目录 方法一:添加阿里云镜像 方法二:修改 docker-ce.repo 中 docker-ce-stable 镜像为阿里云 其他说明:官方源添加方法 方法一:添加阿里云镜像 yum-config-m ...
- TypeError: expected str, bytes or os.PathLike object, not int(解决方法)
在使用 pip 安装软件时,报错如下 $ pip install numpy Exception: Traceback (most recent call last): File "/u ...
- 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 ...
- 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解决 ...
- Microsoft Visual C++ 14.0 is required解决方法
在用python调用别的语言(我用的是cache数据库)的方法时,在执行"python setup3.py install"方法时出现"error: Microsoft ...
最新文章
- 眼耳鼻舌身意,严肃地聊一聊元宇宙的“技术拼图”
- 函数声明与函数表达式
- 用verilog语言写的任意整数的分频器
- poj 1195(二维树状数组)
- 「 每日一练,快乐水题 」540. 有序数组中的单一元素
- 剑指Offer-LeetCode刷题
- 排序算法入门之冒泡排序优化
- 智慧屏用鸿蒙的生态,紧随鸿蒙OS手机版 ,智慧屏为什么对鸿蒙生态这么重要?...
- 织梦CMS内核宝宝算命取名企业模板
- python collections,函数等笔记
- ggplot2作图详解:映射(mapping)
- FPGA开发设计流程
- Qt 动图 播放png阵列 避免使用gif导致失真
- Tableau如何动态显示销售数据排名
- 怎么使用svn下载到本地
- excel多元线性拟合_多元线性回归EXCEL图表
- Spring Data ElasticSearch - 分布式搜索和数据分析引擎 相关操作实战流程
- [样本分析] 海莲花CS样本
- vSphere虚拟网络02 - 虚拟交换机
- 【C语言学习笔记】《C程序设计语言》读后感