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 ...
随机推荐
- CentOS 5.8 上安装 systemtap-2.6
最近为了分析公司的一个 nginx + lua 的应用性能,正好需要用到春神的那套 nginx-lua 的分析脚本,因此就立马去搭建下 环境: CentOS 5.8 Lua 5.2.3 luajit- ...
- Openfire:XMPP的几种消息类型
XMPP 有以下几种消息类型: l Normal l Chat l Groupchat l Headline l Error 根据官方文档(http://www.igniterea ...
- Spring 计时器 @Scheduled cron 含义
Spring 计时器 @Scheduled cron 含义 学习:http://blog.csdn.net/prisonbreak_/article/details/49180307 http://b ...
- quick-cocos2d-x教程7:程序框架内framework文件夹分析
framework是整个框架执行时的实现代码.所以一定要细致看这个文件夹的文件.我们先从framework文件夹中的init.lua分析起走. init.lua文件里,框架初始化时,会自己主动加载下面 ...
- Android之怎样使用ListView列表视图
ListView 列表视图创建方法: (1)直接使用ListView 组件创建 (2)让Activity继承ListActivity实现 第一种:在XML中直接使用ListView 组件创建 在val ...
- c/c++ 数据结构之位图(bitmap)具体解释
1. 概述 位图(bitmap)是一种很经常使用的结构,在索引.数据压缩等方面有广泛应用. 本文介绍了位图的实现方法及其应用场景. 2. 位图实现 2014728101320" alt=& ...
- Mahout算法调用展示平台2.1
软件版本号: windows7: Tomcat7.JDK7.Spring4.0.2.Struts2.3.Hibernate4.3.myeclipse10.0.easyui:Linux(centos6. ...
- Unix网络编程 高级IO套接字设置超时
我们知道.对于一个套接字的读写(read/write)操作默认是堵塞的.假设当前套接字还不可读/写,那么这个操作会一直堵塞下去,这样对于一个须要高性能的server来说,是不能接受的.所以,我们能够在 ...
- Android Calendar的运用
import java.text.DateFormat; import java.text.ParsePosition; import java.text.SimpleDateFormat; impo ...
- C#实现对数据库的备份还原(完全)
C#实现对数据库的备份还原 ( 用SQL语句实现对数据库备份还原操作 备份SqlServer数据库: backup database 数据库名 to disk (备份文件存放路径+文件名).bak 还 ...