MySQL Error Code 1118: Row Size Too Large
In your attempt to create a table with 325 columns, you encountered error code 1118, indicating that the row size exceeded the limit of 8126 bytes.
You've tried common solutions such as changing VARCHAR to TEXT and enabling Barracuda file format, but the issue persists. One possible cause is strict mode settings in MySQL.
Solution: Disable Strict Mode
To resolve this issue, you can disable strict mode by setting:
innodb_strict_mode = 0
within the MySQL configuration file (my.ini). Strict mode enforces several checks, including row size limitations. Disabling it can allow you to create tables with larger row sizes.
Caution:
Disabling strict mode may make your database less strict when handling data integrity issues. Consider using other techniques, such as reducing the number of columns or using BLOB or TEXT data types, to manage table size efficiently.
Additional Considerations:
The above is the detailed content of MySQL Error 1118: How Can I Fix 'Row Size Too Large' When Creating a Table with Many Columns?. For more information, please follow other related articles on the PHP Chinese website!