Row size too large. The maximum row size for the used table type, not counting BLOBs
2020-02-06 11:46
197 查看
今天在使用native向mysql中导入csv文件的时候报错: 错误信息:
Cannot create table [HBJ20190411]: 1118 - Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
百度了一下午,网上给出的解决方案是:
解决步骤
-
在MySQL的配置文件中添加:
[mysqld]
max_allowed_packet=16M
-
在MySQL的配置文件中添加:
[mysqld]
innodb_file_per_table=1
-
修改MySQL全局变量:
SET GLOBAL innodb_file_format=‘Barracuda’;
-
删除原表,创建一个新表,并设置表的属性:
ROW_FORMAT=COMPRESSED
上面的解决步骤我试了一下还是会报同样的错误,问题没有解决。
最后我试了一下在导入csv文件的时候将建表语句中的varchar类型数据的长度都由255改成了100.能够成功导入数据。
具体原因的话:
大概是我表中字段过多,又都是varchar类型,但是一个varchar/char占3个字节 每行数据不能超过65535个字节 所以每行的varchar/char不能超过21845。所以在建表的时候将有些varchar类型的默认的长度255改小一点就好
所有varchar类型的字段长度总和不要超过21845.
- 点赞 2
- 收藏
- 分享
- 文章举报
相关文章推荐
- Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You
- ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not counting B
- ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not counting B
- mysql 报错:Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65
- Mysql [Err] 1118 - Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535.
- [MySQL 错误]ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not
- MySQL出现The maximum row size for the used table type, not counting BLOBs, is 8126.错误
- [MySQL 错误]ERROR 1118 (42000): Row size too large. The maximum row size for the used table type, not
- Row size too large. The maximum row size for the used table type 解决
- ERROR 1118 : Row size too large. The maximum row size for the used table type
- Mysql_大字段问题Row size too large.....not counting BLOBs, is 8126.
- SoapUI启动报错:The JVM could not be started. The maximum heap size (-Xmx) might be too large
- SoapUI启动报错:The JVM could not be started. The maximum heap size (-Xmx) might be too large
- SoapUI启动报错:The JVM could not be started. The maximum heap size (-Xmx) might be too large
- SoapUI启动报错:The JVM could not be started. The maximum heap size (-Xmx) might be too large
- Data for Source Column 3(’Col3’) is too large for the specified buffer size.
- Index column size too large. The maximum column size is 767 bytes.
- OpenStack Error – Index column size too large. The maximum column size is 767 bytes [Solved]
- MySQL报错 Mysql Row Size too large (>8126) 和 Unknow Table Engine InnoDB 解决方案
- [Cassandra] Mutation of <x> bytes is too large for the maxiumum size of <y>