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

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

解决办法:

MyISAM有3种行存储格式:fixed/dynamic/compressed。InnoDb在MyIASM基础上新引入了Barracuda。

  • 1、在my.cnf的mysqld片段下添加

    innodb_file_per_table
    innodb_file_format = Barracuda
  • 2、新建一个查询进行如下操作将nombre_tabla改成你的表名ALTER the table to use ROW_FORMAT=COMPRESSED.

    ALTER TABLE nombre_tabla
    ENGINE=InnoDB
    ROW_FORMAT=COMPRESSED
    KEY_BLOCK_SIZE=8;

你可能感兴趣的:(解决数据库不能存储数据问题)