Home >Database >Mysql Tutorial >How to Resolve MySQL Error 1118: 'Row size too large' When Creating Tables with Many Columns?
When attempting to create a MySQL table with a large number of columns (325 in this case), users may encounter the "Error Code: 1118 Row size too large" error. This error occurs when the total size of the data in the table row exceeds the maximum row size allowed by the database.
To resolve this issue, several measures can be taken:
In the provided example, the user replaced VARCHAR columns with TEXT and enabled Barracuda, but the error persisted. The issue was eventually resolved by setting innodb_strict_mode=0 to disable strict mode. This allowed the table to be created successfully despite exceeding the maximum row size limit. It's important to note that disabling strict mode should be considered a last resort due to its potential implications on data integrity.
The above is the detailed content of How to Resolve MySQL Error 1118: 'Row size too large' When Creating Tables with Many Columns?. For more information, please follow other related articles on the PHP Chinese website!