MySQL解决[Err] 1206 - The total number of locks exceeds the lock table size问题

查看MySQL版本:mysql>show version();

解决标题中的问题:修改innodb_buffer_pool_size的大小。

1、查看当前innodb_buffer_pool_size的大小:mysql>show variables like '%innodb_buffer_pool_size%';

一般默认为134217728,即128MB。

2、修改innodb_buffer_pool_size,尝试:mysql>set innodb_buffer_pool_size=2,147,483,648;

尝试修改为2GB,失败,提示:ERROR 1238 (HY000): Variable 'innodb_buffer_pool_size' is a read only variable

3、换一种方式,修改my.cnf

(1)查找my.cnf位置:tom@ubuntu: sudo find / -name 'my.cnf' 2>1

2>1.附:ls a.txt b.txt 1>file.out 2>file.out
这样写的话你没考虑stdout和stderr的缓冲。
stdout是行缓冲的,他的输出会放在一个buffer里面,只有到换行的时候,才会输出到屏幕;而stderr是无缓冲的,会直接输出。
重定义到文件后,stdout就变成全缓冲(而不是行缓冲),得等到缓冲区满(一般8192B)才会实际写入;而stderr不管怎么样重定向,都是无缓存,向其输入数据后,马上实际写入。
这样有可能导致file.out文件内容错乱,stdout和stderr内容前后顺序颠倒

(2)my.cnf在ubuntu下默认在/etc/mysql/my.cnf

sudo vi /etc/mysql/my.cnf

在[mysqld]下面填加:

innodb_buffer_pool_size=2G

(3)保存修改后,重启mysql服务:sudo service mysql restart

之后查看innodb_buffer_pool_size是否修改成功

MySQL解决[Err] 1206 - The total number of locks exceeds the lock table size问题的更多相关文章

  1. MySQL配置文件路径及‘The total number of locks exceeds the lock table size’问题

    在删除mysql中的数据时,遇到报错: ERROR 1206 (HY000): The total number of locks exceeds the lock table size 查了查,发现 ...

  2. mysql报错"ERROR 1206 (HY000): The total number of locks exceeds the lock table size"的解决方法

    1. 问题背景         InnoDB是新版MySQL(v5.5及以后)默认的存储引擎,之前版本的默认引擎为MyISAM,因此,低于5.5版本的mysql配置文件.my.cnf中,关于InnoD ...

  3. 【MySQL笔记】mysql报错"ERROR 1206 (HY000): The total number of locks exceeds the lock table size"的解决方法

    step1:查看 1.1 Mysql命令行里输入"show engines:"查看innoddb数据引擎状态, 1.2 show variables "%_buffer% ...

  4. mysql 数据库缓存调优之解决The total number of locks exceeds the lock table size错误

    环境: mysql5.6.2  主从同步(备注:需操作主库和从库) 一.InnoDB表执行大批量数据的更新,插入,删除操作时会出现这个问题,需要调整InnoDB全局的innodb_buffer_poo ...

  5. MySQL插入大批量数据时报错“The total number of locks exceeds the lock table size”的解决办法

    事情的原因是:我执行了一个load into语句的SQL将一个很大的文件导入到我的MySQL数据库中,执行了一段时间后报错"The total number of locks exceeds ...

  6. MYSQL 遭遇 THE TOTAL NUMBER OF LOCKS EXCEEDS THE LOCK TABLE SIZE

    今天进行MySql 一个表数据的清理,经过漫长等待后出现 The total number of locks exceeds the lock table size 提示.以为是table_cache ...

  7. Mysql_解决The total number of locks exceeds the lock table size错误

    在操作mysql数据库表时出现以下错误. 网上google搜索相关问题,发现一位外国牛人这么解释: If you're running an operation on a large number o ...

  8. mysql:The total number of locks exceeds the lock table size

    使用mysql InnoDB存储引擎进行大量数据的更新,删除的时候容易引发”The total number of locks exceeds the lock table size”问题,解决方法之 ...

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

    参考:https://blog.csdn.net/weixin_40683253/article/details/80762583 mysql在进行大批量的数据操作时,会报“The total num ...

随机推荐

  1. 洛谷 P2708 硬币翻转 题解

    题目传送门 真如题面所说,难度系数:☆☆☆☆☆(如果你看懂了). 从后往前扫一次,如果a[i]==0&&a[i-1]==1那么将ans+2. 注意最后不要忘记开头if(a[0]=='0 ...

  2. spring_150910_hibernate_id_auto

    package com.spring.model; import javax.persistence.Entity; import javax.persistence.GeneratedValue; ...

  3. 500 多个 Linux 命令文档搜索

    500 多个 Linux 命令文档搜索 搜索界面:https://wangchujiang.com/linux-command/ 源码:https://github.com/jaywcjlove/li ...

  4. jquery.autocomplete修改 实现键盘上下键 自动填充

    根据需求要实现通过键盘上下移动,获得联想菜单中的值,如同google baidu的查询功能. 在网上找了很久没有找到可以实现该功能的插件,无奈只能自己动手改代码.找到js中的KEY.DOWN 和 KE ...

  5. 很好的开源UI框架Chico UI

    介绍一个很好的开源的UI框架,依赖于jquery 官网:http://www.chico-ui.com.ar/ 以下是相关截图: 消息提示 自动完成 分页,列表 Chico UI是什么? Chico ...

  6. NBUT 1221 Intermediary

    最短路,三进制状态压缩. $dis[i][j]$表示到$i$节点,每个中介用了几次的情况下的最小花费,跑最短路即可. #include<cstdio> #include<cstrin ...

  7. 隐马尔可夫模型(Hidden Markov Model)

    隐马尔可夫模型(Hidden Markov Model) 隐马尔可夫模型(Hidden Markov Model, HMM)是一个重要的机器学习模型.直观地说,它可以解决一类这样的问题:有某样事物存在 ...

  8. Selenium快速入门(下)

    Frame相关 import time from selenium import webdriver from selenium.common.exceptions import NoSuchElem ...

  9. Process Explorer常用操作介绍

    (未获得作者本人同意,严禁转载) Process Explorer出现的背景 Process Explorer可以看成是一个加强版的任务管理器.在较早的Windows版本中,任务管理器提供的功能是非常 ...

  10. 【BIT套主席树】COGS257-动态排名系统

    题意同BZOJ1901,多组数据,数据范围也不一样.重新写一遍复习一下. #include<iostream> #include<cstdio> #include<cst ...