title: How to configure MySQL 5.6 LONGBLOB for large binary data
body: <p>Before I ask my question a little background: I'm doing the Data Export/Import using the MySQL Workbench 6.1 of a MySQL 5.5 database from one machine to a 5.6 on another. both machines are ubuntu one 32-bit the other 64-bit.</p>
  
  <p>I dump the data no problem, but when I try to load it I get the:</p>
  
  <blockquote>
    <p>ERROR 1118 (42000) at line 1807: 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.  </p>
  </blockquote>
  
  <p>Here is the table create:</p>
  
  <pre><code>CREATE TABLE `file_content` (
    `fileid` bigint(20) NOT NULL,
    `content` LONGBLOB NOT NULL,
    PRIMARY KEY (`fileid`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  </code></pre>
  
  <p>I have the following relevant my.cnf settings ... </p>
  
  <blockquote>
    <p>max_allowed_packet=1G<br>
    innodb_file_per_table=1<br>
    innodb_file_format=Barracuda</p>
  </blockquote>
  
  <p>I spend a lot of googling time trying to figure out what the problem is. BTW if I remove the primary key (no problem here, but another table that has a foreign key into this table complains.</p>
  
  <p>As luck would have it, I have the ssh access to the box so I can see actual mysqldb.log. why I find there is really interesting ...    </p>
  
  <blockquote>
    <p>2014-08-12 20:42:12 25246 [ERROR] InnoDB: The total blob data length (14179167) is greater than 10% of the redo log file size (3072). Please increase innodb_log_file_size.</p>
  </blockquote>
  
  <p>So increasing the redo log file size to 10x LONGBLOB size fixed my issue. However does that mean that to insert a 1G LONGBLOB (thats the actual maximum because of the packet size) I will need a 10G innodb_log_file_size.</p>
  
  <p>Can anyone explain how "redo log size error" turns into "row size too large (>8126)" error.</p>
  
  <p>BTW I have no control over the structure of this db so no "why are you storing large blobs in the database".</p>
  
  <p>TIA</p>