Mysql [Err] 1118 - Row size too large
首先声明,对MySQL不懂,很多都不知道原因
设计了一个表,里面很多text字段,然后填进去的东西太多(用的是Python的MySQLdb),报错:
_mysql_exceptions.OperationalError: (1118, 'Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. You have to change some columns to TEXT or BLOBs')
内容是填进去的数据太长了,需要将部分列类型改为text或者blob,相应的mysql的长度限制参考https://dev.mysql.com/doc/refman/5.1/en/column-count-limit.html
显然,我已经有了一大堆的text,算来算去都不会超过长度的。搜了下最终的解决方法http://www.cnblogs.com/gaizai/archive/2012/09/20/2695663.html
以下仅作一些记录
1.windows下mysql的配置文件在对应的X:\ProgramData\MySQL文件夹下面,找了半天都没找到
2.在配置文件中添加以下内容
[mysqld]
max_allowed_packet=16M
innodb_file_per_table=1
3.然后修改全局变量
SET GLOBAL innodb_file_format='Barracuda';
4.创建表格时添加上压缩方式ROW_FORMAT=COMPRESSED,例如CRATE TABLE test(id int)ROW_FORMAT=COMPRESSED;
具体原因不懂,可能是没有对表格使用压缩的方式存储,导致长度过长
Mysql [Err] 1118 - Row size too large的更多相关文章
- Mysql [Err] 1118 - Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535.
对于越来越多的数据,数据库的容量越来越大,压缩也就越来越常见了.在我的实际工作中进行过多次压缩工作,也遇到多次问题,在此和大家分享一下. 首先,我们先说说怎么使用innodb的压缩. 第一,mysql ...
- [ERR] 1118 - Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.
昨天,在测试新的数据库时,迁移表遇到了这个问题.现在记录一下解决方案. 1.在配置文件中添加关闭严格模式的配置:sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS ...
- mysql触发器应用和创建表错误代码: 1118 Row size too large. 解决
1.针对数据库查询问题的方便,可以建立重要表的log备份记录表,在主表的添加,修改,删除添加触发器,修改触发器增加触发字段的点,限制条件. 数据库log表查问题比从线上多台服务器上下载日志文件相对方便 ...
- 【bug】 1118 Row size too large
1118 Row size too large Every table (regardless of storage engine) has a maximum row size of 65,535 ...
- mysql 报Row size too large 65535 原因与解决方法
报错信息:Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535 ...
- Mysql_大字段问题Row size too large.....not counting BLOBs, is 8126.
[问题描述] 1.从myslq(5.7.19-0ubuntu0.16.04.1)中导出sql脚本,导入到mysql(5.5.27)中,报如下错误:Row size too large. The max ...
- MySQLSyntaxErrorException: Row size too large 转摘自:https://confluence.atlassian.com/display/CONFKB/MySQLSyntaxErrorException%3A+Row+size+too+large
Symptoms The following appears in the atlassian-confluence.log: Caused by: com.mysql.jdbc.exceptions ...
- mysql 1709: Index column size too large. The maximum column size is 767 bytes.
1709: Index column size too large. The maximum column size is 767 bytes. 修改排序规则解决 utf8_general_ci
- mysql row size上限
mysql innodb 的 row size上限 背景 在项目使用中,出现了以下报错: Error Code: 1118 - Row size too large (> 8126). Chan ...
随机推荐
- Android图片异步载入框架Android-Universal-Image-Loader
Android-Universal-Image-Loader是一个图片异步载入,缓存和显示的框架.这个框架已经被非常多开发人员所使用,是最经常使用的几个Android开源项目之中的一个,主流的应用,随 ...
- ubuntu 配置静态路由
原文:http://blog.sina.com.cn/s/blog_6fd8d5d90101f1xy.html -------------------------------------------- ...
- 使用butterknife注解project配置
使用butterknife注解的时候建议使用Jar包 Jar包下载地址:https://github.com/JakeWharton/butterknife Eclipseproject配置: 步骤一 ...
- vsftpd出现“Response: 500 OOPS: cannot change directory”解决方法(转载)
vsftpd出现“Response: 500 OOPS: cannot change directory”解决方法 笔者用的Linux发行版本为centos当用FTP客户端连接时,出现如下错误提示 ...
- oc34--instancetype和id的区别
// Person.h #import <Foundation/Foundation.h> @interface Person : NSObject @property int age; ...
- LESS2CSS for sumlime text2
Windows下的安装 Less2Css插件依赖lessc这个工具,在windows下可以下载或者用git cloneless.js-windows到本地目录.然后把目录地址加入到环境变量PATH的中 ...
- @Transaction 无效
上班的时候碰到这个问题,看了一些博客写的,都试了一遍解决方案,发现结果还是不行, 最后突然发现我的配置顺序和网上的有些许不同,就改了下,发现成功了,特此打桩纪念一下. 一.先说一下基本用法: 1. @ ...
- php write excel
/** * 写excel方法 */ function writeExcel($tabArr, $dataArr,$path) { require_once CODE_BASE2 . '/util/ph ...
- poj2975 Nim(经典博弈)
Nim Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 5866 Accepted: 2777 Description N ...
- iOS 点击事件传递及响应
1.iOS中的事件 iOS中的事件可以分为3大类型: 触摸事件 加速计事件 远程控制事件这里我们只讨论iOS中的触摸事件. 1.1响应者对象(UIResponder) 在iOS中不是任何对象都能处理事 ...