Error: MYSQL | SQLSTATE [42000]: Syntax error or access violation: 1118 Row size too large (> 8126)
This error may occur when running the command: php php artisan db:seed
resulting on the following message:
SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large (> 8126).
Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help.
In current row format, BLOB prefix of 768 bytes is stored inline.
To fix this issue, you can use the following command:
ALTER TABLE `<TABLE_NAME>` ENGINE=InnoDB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
Quickly Dropping and Creating a Database
To drop and recreate a database efficiently, use the following SQL commands:
DROP DATABASE IF EXISTS <DATABASE_NAME>;
CREATE DATABASE <DATABASE_NAME>;
This guide provides quick solutions for common MySQL issues and tasks related to database management.