美文网首页
解决数据库不能存储数据问题

解决数据库不能存储数据问题

作者: Yaococo88 | 来源:发表于2017-05-04 12:12 被阅读0次

报错:
[42000][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.

解决办法:
<b>
MyISAM有3种行存储格式:fixed/dynamic/compressed。InnoDb在MyIASM基础上新引入了Barracuda。

  • 1、在my.cnf的mysqld片段下添加
    <pre>
    innodb_file_per_table
    innodb_file_format = Barracuda
    </pre>
  • 2、新建一个查询进行如下操作将nombre_tabla改成你的表名ALTER the table to use ROW_FORMAT=COMPRESSED.
    <pre>
    ALTER TABLE nombre_tabla
    ENGINE=InnoDB
    ROW_FORMAT=COMPRESSED
    KEY_BLOCK_SIZE=8;
    </pre>

相关文章

网友评论

      本文标题:解决数据库不能存储数据问题

      本文链接:https://www.haomeiwen.com/subject/gsbrtxtx.html