当前位置:网站首页>Mysql database reports an error: row size too large (> 8126) Changing some columns to TEXT or BLOB or using ROW_ FORMAT=DY

Mysql database reports an error: row size too large (> 8126) Changing some columns to TEXT or BLOB or using ROW_ FORMAT=DY

2022-07-06 12:41:00 wx5caecf2ed0645


1. Problem description :

Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help

Mysql Database error :Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DY_ The configuration file

Mysql Database error :Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DY_ The configuration file _02

2. The reasons causing :

1. There are many data in the table , Too many logs are generated , The default log file size is too small ;

2. Different engines use different storage formats .MyISAM Yes 3 A row storage format :fixed/dynamic/compressed.InnoDb stay MyIASM Based on the new introduction Barracuda. As for the default settings of different engines , And the differences between various storage formats ,

3. Solution

Mode one : modify Mysql Database configuration file

hold Mysql Database my.ini Configuration item innodb_log_file_size=512M modify 1024M, Just restart the database service .

Mode two : Modify other engines

Database information before modification :

Change to engine :

Mysql Database error :Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DY_ The configuration file _03

Mysql Database error :Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DY_ The configuration file _04

Mode three :

Try adding the following options to the configuration file :

To activate the new file format : innodb_file_format = Barracuda

Store each table in its own file : innodb_file_per_table = 1

To prevent accidents : innodb_strict_mode = ON

To store long variable length column values , Please use dynamic or compressed row format for large tables .

for example , Use ALTER TABLE LargeTable ENGINE = InnoDB ROW_FORMAT = DYNAMIC;


原网站

版权声明
本文为[wx5caecf2ed0645]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202131515048488.html