How to configure MySQL 5.6 LONGBLOB for large binary data
The reason for this issue is a change in MySQL 5.6.20 as one could read in the change log:
As a result of the redo log BLOB write limit introduced for MySQL 5.6, the innodb_log_file_size setting should be 10 times larger than the largest BLOB data size found in the rows of your tables plus the length of other variable length fields (VARCHAR, VARBINARY, and TEXT type fields). No action is required if your innodb_log_file_size setting is already sufficiently large or your tables contain no BLOB data.
To resolve your issue you have to increase the value of the innodb_log_file_size option in your my.ini
below the [mysqld]
section. Its default value is 48M
. Setting it to
[mysqld]
innodb_log_file_size=256M
helped in my case.
Be careful when changing the value of innodb_log_file_size
that you do this safely:
- You need to shut the server down cleanly and normally.
- Move away (don’t delete) the log files, which are named ib_logfile0, ib_logfile1, and so on.
- Check the error log to ensure there was no problem shutting down.
- Then restart the server and watch the error log output carefully. You should see InnoDB print messages saying that the log files don’t exist. It will create new ones and then start.
- At this point you can verify that InnoDB is working, and then you can delete the old log files.
For these who cant find this for XAMPP:
At first i could not find correct file to edit innodb_log_file_size
Actual file: xampp/mysql/bin/my.ini