Mysql解决The total number of locks exceeds the lock table size错误

Mysql解决The total number of locks exceeds the lock table size错误

InnoDB表执行大批量数据的更新,插入,删除操作时会出现这个问题,需要调整InnoDB全局的innodb_buffer_pool_size的值来解决这个问题,并且重启mysql服务。
 
 
show variables like "%_buffer%";(不要忘记带;号,没有;号表示一条语句没有结束)
默认的innodb_buffer_pool_size=8M
 
 
显示的格式是 1M*1024*1024,设置的时候也要这样设置,例如
 
 
修改 innodb_buffer_pool_size的值为3G:
 
SET GLOBAL innodb_buffer_pool_size=67108864;(3*1024*1024*1024,不要忘记;号)
 
 
最后删除成功了
 
posted @ 2022-06-14 12:14  阿星随记  阅读(506)  评论(0编辑  收藏  举报