首先声明,对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的更多相关文章

  1. Mysql [Err] 1118 - Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535.

    对于越来越多的数据,数据库的容量越来越大,压缩也就越来越常见了.在我的实际工作中进行过多次压缩工作,也遇到多次问题,在此和大家分享一下. 首先,我们先说说怎么使用innodb的压缩. 第一,mysql ...

  2. [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 ...

  3. mysql触发器应用和创建表错误代码: 1118 Row size too large. 解决

    1.针对数据库查询问题的方便,可以建立重要表的log备份记录表,在主表的添加,修改,删除添加触发器,修改触发器增加触发字段的点,限制条件. 数据库log表查问题比从线上多台服务器上下载日志文件相对方便 ...

  4. 【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 ...

  5. mysql 报Row size too large 65535 原因与解决方法

    报错信息:Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535 ...

  6. 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 ...

  7. 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 ...

  8. 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

  9. mysql row size上限

    mysql innodb 的 row size上限 背景 在项目使用中,出现了以下报错: Error Code: 1118 - Row size too large (> 8126). Chan ...

随机推荐

  1. Java web如何定位工程路径

    一 项目路径的获得 System.getProperty("user.dir"); 可以获得当前用户的工作目录,即在哪个地方启动的java程序,返回就是当前目录 二 web项目根目 ...

  2. java Regex

    超全 http://www.rexegg.com/regex-lookarounds.html 这篇文章不错:http://www.cnblogs.com/lzq198754/p/5780340.ht ...

  3. jenkins+jmeter+ant+jmeter在Jenkins上报告

    1.jmeter+ant 参考 http://www.cnblogs.com/dieyaxianju/p/8268802.html 2.在jenkins上配置 3.执行成功 4.配置报告  参考 下载 ...

  4. Android 输入管理服务-输入事件到达之后的处理流程

    接上一篇博客"Android 输入管理服务启动过程的流程".这两天分析了Android 输入管理服务接收到输入事件之后的处理流程,详细流程例如以下面两图所看到的: 接下图

  5. [洛谷0925]NOIP模拟赛 个人公开赛 OI

     P3395 路障 题目背景 此题约为NOIP提高组Day1T1难度. 题目描述 B君站在一个n*n的棋盘上.最开始,B君站在(1,1)这个点,他要走到(n,n)这个点. B君每秒可以向上下左右的某个 ...

  6. THRDTERM-----干净地结束一个线程

    THRDTERM产生两个线程.周期性地检查一个event对象.以决定要不要结束自己. #define WIN32_LEAN_AND_MEAN #include<stdio.h> #incl ...

  7. uboot 解压缩

    在uboot中进行解压缩是非常实用的 uboot中完毕delay 用户进行交互的段 if(BootType == '3') { char *argv[3]; printf("   \n3: ...

  8. 89. Ext.Button 按钮

    转自:http://www.cnblogs.com/lipan/archive/2011/12/13/2274797.html 从本篇开始讲基础控件,ExtJs对所有的UI控件都有它自己的一套封装.本 ...

  9. Coursera公开课-Machine_learing:编程作业6

    Support Vector Machines I have some issues to state. First, there were some bugs in original code wh ...

  10. Prism.Interactivity 之 PopupWindowAction 用法简记

    PopupWindow通过InteractionRequestTrigger(EventTrigger的派生类)侦听目标对象(InteractionRequest<T>类型)的Raised ...