ERROR 1118 (42000) Row size too large

Today, We want to share with you ERROR 1118 (42000) Row size too large.In this post we will show you [SOLVED] XAMPP Row size too large, innoDB sql import, hear for MySQL database import fails: ERROR 1118 (42000): Row size too large we will give you demo and example for implement.In this post, we will learn about Internal Server Error: SQLSTATE[42000] 1118 Row size too large with an example.

ERROR 1118 (42000) Row size too large

There are the Following The simple About ERROR 1118 (42000) Row size too large Full Information With Example and source code.

As I will cover this Post with live Working example to develop innodb_log_file_size row size too large, so the mysql increase row size limit for this example is following below.

MySQL: Error Code: 1118 Row size too large (> 8126). Changing some columns to TEXT or BLOB
MySQL ERROR 1118 (42000) at line 1: Row size too large (> 8126).

Error On PHP MySQL :

“#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.”


In my.cfn add:

innodb_strict_mode = 0    


To simple PHP MYSQL avoid those errors, We need to use :

innodb_file_format = Barracuda
innodb_file_per_table = 1

The first of all we can resolve 2 options are global as well as dynamic variables, the third one is a main CREATE TABLE option.

set global innodb_file_format = barracuda;
set global innodb_file_per_table = 1;

) engine = InnoDB

Note1 : and then we can changing simple innodb_file_format, while We are making the innodb mysql table externalle, We need to specify the row_format=dynamic; after only it will step by step, other wise table will be created with antelope(default) format onlyl.

Note2 : if We later alter the table, We’ll have to set the dynamic variables, otherwise the table will be rebuilt using the active innodb_file_per_table and innodb_file_format values.

If the values are incompatible with ROW_FORMAT = DYNAMIC, the table will be make with a warning that We may not any notice in time.

Like as when innodb_file_per_table = 0 or innodb_file_format=antelope:

mysql> create table t(id int, b blob) engine = InnoDB row_format=dynamic;
Query OK, 0 rows affected, 2 warnings (0.16 sec)

mysql> show warnings;
| Level   | Code | Message                                                    |
| Warning | 1478 | InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table. |
| Warning | 1478 | InnoDB: assuming ROW_FORMAT=COMPACT.                       |
2 rows in set (0.00 sec)

For this reason, it can be good to permanently change the main settings in the set configuration file as well :

innodb_file_format = Barracuda
innodb_file_per_table = 1

Its always a best practice to set the main configuration file when you change as well as global variables php dynamically inside server.

Web Programming Tutorials Example with Demo

Read :


You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about ERROR 1118 (42000) Row size too large.
I would like to have feedback on my blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Leave a Comment