mysql5.7.26:[ERR] 1118 – Row size too large (> 8126)

Scene reappearance

   after exporting all the table structures from the MySQL Library of the Linux server, prepare to transfer them to the local windows. The MySQL version of Linux is 5.7.26 , the local version is 5.7 , or the 32-bit MSI program is installed (previously downloaded when I went to school, it has been retained until now)
   when executing all table structures locally, [err] 1118 appears, because this problem also occurs on Linux. Check the my.cnf configuration file of MySQL in Linux, and add the corresponding configuration to my.ini or my-default.ini locally. After restarting, the error remains when executing the script again
   later, I searched most of the solutions on the Internet, but they couldn’t solve them; Later, thinking that it might be caused by the inconsistency of database versions, I downloaded the windows 5.7.26 zip package from the official website of MySQL. After decompressing and installing according to the installation tutorial, I added the configuration added in the MySQL configuration file in Linux to my.ini of the new local mysql. After restarting, I executed all the table scripts and executed successfully.

Error message

[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.

Solution:

  in my.ini for windows and /etc/my.cnf for Linux, add the following code under the [mysqld] tag:

sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
innodb_strict_mode=0
max_allowed_packet=16M

After restart, it is running normally.


Author: su1573
I record my life, learn and share, please give me more advice
if you need to communicate, please contact [email protected]3.com , I will reply in time when I see it


Read More: