mysql问题:1118 - Row size too large (> 8126)

一、修改配置

 

1、查询系统参数

show variables like '%innodb_strict_mode%';
show variables like '%innodb_log_file_size%';

 

2、修改系统参数

vim /etc/my.cnf
#添加如下:
innodb_log_file_size=1024M
innodb_strict_mode=0

 

3、重启mysql

(1)、使用 service 启动:

service mysqld restart

(2)、使用 mysqld 脚本启动:

/etc/inint.d/mysqld restart

 

二、拆表

 造成该问题的原因就是 所有字段的长度的总和 过长,我们可以对该表就行拆表,即拆成两到三个小表

 

posted @ 2021-10-26 11:28  宇宙小咖  阅读(746)  评论(0)    收藏  举报