After upgrading mysql from 5.5 to 5.7, a compressed innodb database seems corrupted. I followed the method in this post to create a new database/table, drop the tablespace, copy the old .ibd file, then import the tablespace with ALTER TABLE mytable IMPORT TABLESPACE
but got the same error as in that post:
ERROR 1034 (HY000): Incorrect key file for table 'mytable'; try to repair it
Note that this error is not caused by insufficient disk space.
SHOW CREATE TABLE
; I would like to see what column(s) could benefit from compression. And I may have other tips (such as avoidingBIGINT
).mytable
(title
varchar(700) NOT NULL DEFAULT '',content
mediumtext NOT NULL,ctime
datetime NOT NULL, PRIMARY KEY (title
(255)) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED