当前位置:Gxlcms > 数据库问题 > MySQL插入单行数据较大时报Row size too large错误 解决方案

MySQL插入单行数据较大时报Row size too large错误 解决方案

时间:2021-07-01 10:21:17 帮助过:3人阅读

+--------------------------+----------+
| Variable_name            | Value    |
+--------------------------+----------+
| innodb_file_format       | Antelope |
| innodb_file_format_check | ON       |
| innodb_file_format_max   | Antelope |
+--------------------------+----------+

mysql> show variables like ‘%per_table%‘;
+-----------------------+-------+
| Variable_name         | Value |
+-----------------------+-------+
| innodb_file_per_table | OFF   |
+-----------------------+-------+
1 row in set (0.03 sec)


2. 修改参数: my.cf中在[mysqld] 加入

innodb_file_format = Barracuda
innodb_file_per_table = 1 

    检查修改后的结果:

mysql> show variables like ‘%per_table%‘;
+-----------------------+-------+
| Variable_name         | Value |
+-----------------------+-------+
| innodb_file_per_table | ON    |
+-----------------------+-------+
1 row in set (0.00 sec)


mysql> show GLOBAL VARIABLES LIKE ‘%file_format%‘;
+--------------------------+-----------+
| Variable_name            | Value     |
+--------------------------+-----------+
| innodb_file_format       | Barracuda |
| innodb_file_format_check | ON        |
| innodb_file_format_max   | Barracuda |
+--------------------------+-----------+
3 rows in set (0.00 sec)

3. 修改表

Alter table <table_name> engine=innodb ROW_FORMAT=DYNAMIC;


MySQL插入单行数据较大时报Row size too large错误 解决方案

标签:sse   lang   glob   als   err   max   operator   open   失败   

人气教程排行