# PERCONA MYSQL ERROR Error Code: 1034. Incorrect key file for table

**URL:** <https://forums.percona.com/t/percona-mysql-error-error-code-1034-incorrect-key-file-for-table/7475>\
**Category:** Percona XtraBackup\
**Created:** [March 17, 2020, 2:07pm UTC](https://forums.percona.com/t/percona-mysql-error-error-code-1034-incorrect-key-file-for-table/7475 "2020-03-17T14:07:11Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![saloaun](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@saloaun](https://forums.percona.com/u/saloaun)\
**Post date:** [March 17, 2020, 2:07pm UTC](https://forums.percona.com/t/percona-mysql-error-error-code-1034-incorrect-key-file-for-table/7475/1 "2020-03-17T14:07:11Z")

</div>

[URL=“[Timeline for PERCONA MYSQL ERROR Error Code: 1034. Incorrect key file for table - Stack Overflow](https://stackoverflow.com/posts/60729072/timeline)”][/URL] im trying to import a table after partial backup or full with percona 8.0 and im having problems with only 1 table, the size of the table = 14 GB. im doing the steps following all oficial forums:  
[LIST=1]  
[_]full backup: xtrabackup --backup --datadir=/var/lib/mysql --target-dir=/backup/ --parallel=4 --user=‘root’ --password=‘pass’ --no-timestamp  
[_]create table with same structure no data.  
[_]SET FOREIGN\_KEY\_CHECKS=0;  
[_]alter table mytable discard tablespace;  
[_]cp mytable.ibd /var/lib/mysql/database/ & chown -R mysql:mysql /var/lib/mysql/db/mytable.ibd  
[_]SET FOREIGN\_KEY\_CHECKS=0;  
[\*]alter table mytable import tablespace;  
[/LIST]after all this steps i got this error:  
Error Code: 1034. Incorrect key file for table ‘mytable’; try to repair it  
and in mysql.log i got:  
[MY-012762] [InnoDB] Page offset doesn’t match file offset: page offset: 262144, file offset: 262144  
i only get the error some tables, if i restore full backup with --copy-back all tables are OK!  
what can i do? i tried increase change directory /tmp in my.cnf but nothing work.

---

<div class="post-metadata">

**Author:** ![jrivera](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jrivera/32/13_2.png) [@jrivera](https://forums.percona.com/u/jrivera)\
**Post date:** [March 29, 2020, 5:53am UTC](https://forums.percona.com/t/percona-mysql-error-error-code-1034-incorrect-key-file-for-table/7475/2 "2020-03-29T05:53:34Z")

</div>

Are you going to use one of the tables from the backup taken in step 1? If so then I believe you are missing a step to execute --prepare --export. See this link for further guidance: [https://www.percona.com/doc/percona-xtrabackup/8.0/xtrabackup\_bin/restoring\_individual\_tables.html](https://www.percona.com/doc/percona-xtrabackup/8.0/xtrabackup_bin/restoring_individual_tables.html)

---

<div class="post-metadata">

**Author:** ![saloaun](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@saloaun](https://forums.percona.com/u/saloaun)\
**Post date:** [March 29, 2020, 3:16pm UTC](https://forums.percona.com/t/percona-mysql-error-error-code-1034-incorrect-key-file-for-table/7475/3 "2020-03-29T15:16:43Z")

</div>

Hi mate, i did the same follow --prepare --export and i copy the file ibd to mysql location but after import tablespace i got the same error:

[ERROR] [MY-012762] [InnoDB] Page offset doesn’t match file offset: page offset: 262144, file offset: 262144

and

Error Code: 1034. Incorrect key file for table ‘mytable’; try to repair it

---

<div class="post-metadata">

**Author:** ![saloaun](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@saloaun](https://forums.percona.com/u/saloaun)\
**Post date:** [March 29, 2020, 5:34pm UTC](https://forums.percona.com/t/percona-mysql-error-error-code-1034-incorrect-key-file-for-table/7475/4 "2020-03-29T17:34:50Z")

</div>

Hi mate, i did the same follow --prepare --export and i copy the file ibd to mysql location but after import tablespace i got the same error:

[ERROR] [MY-012762] [InnoDB] Page offset doesn’t match file offset: page offset: 262144, file offset: 262144

and

Error Code: 1034. Incorrect key file for table ‘mytable’; try to repair it

---

<div class="post-metadata">

**Author:** ![saloaun](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@saloaun](https://forums.percona.com/u/saloaun)\
**Post date:** [April 5, 2020, 9:44am UTC](https://forums.percona.com/t/percona-mysql-error-error-code-1034-incorrect-key-file-for-table/7475/5 "2020-04-05T09:44:17Z")

</div>

anyone can help me?

---

<div class="post-metadata">

**Author:** ![did1992](https://avatars.discourse-cdn.com/v4/letter/d/f6c823/32.png) [@did1992](https://forums.percona.com/u/did1992)\
**Post date:** [April 13, 2020, 4:40am UTC](https://forums.percona.com/t/percona-mysql-error-error-code-1034-incorrect-key-file-for-table/7475/6 "2020-04-13T04:40:45Z")

</div>

I have the same problem.&nbsp;You have not decided it yet?

---

<div class="post-metadata">

**Author:** ![jrivera](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jrivera/32/13_2.png) [@jrivera](https://forums.percona.com/u/jrivera)\
**Post date:** [May 7, 2020, 12:45am UTC](https://forums.percona.com/t/percona-mysql-error-error-code-1034-incorrect-key-file-for-table/7475/7 "2020-05-07T00:45:12Z")

</div>

To all commenters, I’ve tested the procedure but did not get the same error:

> [@](#):
>
> mysql\> use test2  
> Reading table information for completion of table and column names  
> You can turn off this feature to get a quicker startup with -A  
>   
> Database changed, 1 warning  
> mysql\> show warnings;  
> ±--------±-----±-----------------------------------------------------------------------------------------------------------------------+  
> | Level&nbsp;&nbsp; | Code | Message&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |  
> ±--------±-----±-----------------------------------------------------------------------------------------------------------------------+  
> | Warning | 1287 | ‘COM\_FIELD\_LIST’ is deprecated and will be removed in a future release. Please use SHOW COLUMNS FROM statement instead |  
> | Warning | 1814 | InnoDB: Tablespace has been discarded for table ‘mytable1’&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |  
> ±--------±-----±-----------------------------------------------------------------------------------------------------------------------+  
> 2 rows in set (0.00 sec)  
>   
> mysql\> alter table mytable1 import tablespace;  
> Query OK, 0 rows affected (0.10 sec)  
>   
> mysql\> show tables;  
> ±----------------+  
> | Tables\_in\_test2 |  
> ±----------------+  
> | mytable1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |  
> ±----------------+  
> 1 row in set (0.00 sec)  
>   
> mysql\> select \* from mytable1;  
> ±—±-------+  
> | id | s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |  
> ±—±-------+  
> |&nbsp; 1 | table1 |  
> ±—±-------+  
> 1 row in set (0.00 sec)

Can you share sample table description with SHOW CREATE TABLE tblname\G  
If you can provide terminal output by pasting it in pastebin or similar site that would also help.

---

<div class="post-metadata">

**Author:** ![jrivera](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jrivera/32/13_2.png) [@jrivera](https://forums.percona.com/u/jrivera)\
**Post date:** [May 7, 2020, 12:46am UTC](https://forums.percona.com/t/percona-mysql-error-error-code-1034-incorrect-key-file-for-table/7475/8 "2020-05-07T00:46:07Z")

</div>

Also exact version of Percona Server 8.0 and Percona XtraBackup 8.0 would also help here.

---

<div class="post-metadata">

**Author:** ![jrivera](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jrivera/32/13_2.png) [@jrivera](https://forums.percona.com/u/jrivera)\
**Post date:** [May 30, 2020, 4:27am UTC](https://forums.percona.com/t/percona-mysql-error-error-code-1034-incorrect-key-file-for-table/7475/9 "2020-05-30T04:27:49Z")

</div>

Bug report - [[PS-7095] [InnoDB] Page offset doesn't match file offset: page offset: 524288, file offset: 524288 - Percona JIRA](https://jira.percona.com/browse/PS-7095Please) subscribe to the bug report to get direct updates.

---

<div class="post-metadata">

**Author:** ![saloaun](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@saloaun](https://forums.percona.com/u/saloaun)\
**Post date:** [June 3, 2020, 2:54pm UTC](https://forums.percona.com/t/percona-mysql-error-error-code-1034-incorrect-key-file-for-table/7475/10 "2020-06-03T14:54:00Z")

</div>

mysql\> SHOW CREATE TABLE contabilidad.conta23\G  
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 1. row \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Table: conta23  
Create Table: CREATE TABLE `conta23` (  
&nbsp; `codcop` char(4) CHARACTER SET latin1 COLLATE latin1\_spanish\_ci NOT NULL,  
&nbsp; `documento` char(7) CHARACTER SET latin1 COLLATE latin1\_spanish\_ci NOT NULL,  
&nbsp; `sec` int(11) NOT NULL,  
&nbsp; `cnt` char(2) CHARACTER SET latin1 COLLATE latin1\_spanish\_ci NOT NULL,  
&nbsp; `fecha` date NOT NULL,  
&nbsp; `auxiliar` char(12) CHARACTER SET latin1 COLLATE latin1\_spanish\_ci NOT NULL,  
&nbsp; `codcen` char(6) CHARACTER SET latin1 COLLATE latin1\_spanish\_ci DEFAULT NULL,  
&nbsp; `codbod` char(5) CHARACTER SET latin1 COLLATE latin1\_spanish\_ci DEFAULT NULL,  
&nbsp; `nit` char(16) CHARACTER SET latin1 COLLATE latin1\_spanish\_ci DEFAULT NULL,  
&nbsp; `descripcion` char(250) CHARACTER SET latin1 COLLATE latin1\_spanish\_ci NOT NULL,  
&nbsp; `nat` enum(‘D’,‘C’) CHARACTER SET latin1 COLLATE latin1\_spanish\_ci NOT NULL,  
&nbsp; `valor` decimal(22,2) NOT NULL,  
&nbsp; `numtra` int(11) DEFAULT NULL,  
&nbsp; `valifrs` enum(‘1’,‘2’,‘3’) CHARACTER SET latin1 COLLATE latin1\_spanish\_ci DEFAULT NULL,  
&nbsp; PRIMARY KEY (`cnt`,`codcop`,`documento`,`sec`),  
&nbsp; KEY `cnt` (`cnt`,`codcen`),  
&nbsp; KEY `cnt_2` (`cnt`,`codbod`),  
&nbsp; KEY `cnt_3` (`cnt`,`auxiliar`),  
&nbsp; KEY `conta23_5` (`cnt`,`nit`,`auxiliar`,`fecha`),  
&nbsp; KEY `index6` (`cnt`,`fecha`),  
&nbsp; KEY `index7` (`cnt`,`codcop`,`fecha`),  
&nbsp; KEY `index8` (`cnt`,`codcop`,`documento`,`auxiliar`,`fecha`),  
&nbsp; KEY `ind23a` (`cnt`,`codcop`,`documento`,`sec`,`fecha`,`auxiliar`,`nit`,`nat`),  
&nbsp; KEY `con23b` (`codcop`,`documento`,`cnt`),  
&nbsp; KEY `con23c` (`cnt`,`auxiliar`,`nit`),  
&nbsp; KEY `con23d` (`cnt`,`codcop`,`fecha`,`auxiliar`,`nat`),  
&nbsp; KEY `con23qwe` (`cnt`,`codcop`,`documento`,`sec`,`auxiliar`,`nit`),  
&nbsp; KEY `con23cil1` (`cnt`,`codcop`,`documento`,`auxiliar`,`nit`),  
&nbsp; KEY `conta23car` (`cnt`,`codcop`,`documento`,`auxiliar`,`fecha`),  
&nbsp; KEY `c23uvt1` (`cnt`,`fecha`,`auxiliar`,`nit`,`nat`),  
&nbsp; KEY `con23e` (`cnt`,`codcop`,`documento`,`fecha`,`auxiliar`,`sec`),  
&nbsp; KEY `decar231` (`cnt`,`codcop`,`documento`,`sec`,`auxiliar`,`fecha`,`nat`),  
&nbsp; KEY `nit_cnt` (`cnt`,`nit`),  
&nbsp; CONSTRAINT `conta23_ibfk_1` FOREIGN KEY (`cnt`, `codcen`) REFERENCES `conta06` (`cnt`, `codcen`),  
&nbsp; CONSTRAINT `conta23_ibfk_2` FOREIGN KEY (`cnt`, `codbod`) REFERENCES `conta08` (`cnt`, `codbod`),  
&nbsp; CONSTRAINT `conta23_ibfk_3` FOREIGN KEY (`cnt`, `auxiliar`) REFERENCES `conta02` (`cnt`, `auxiliar`),  
&nbsp; CONSTRAINT `conta23_ibfk_4` FOREIGN KEY (`cnt`, `nit`) REFERENCES `conta04` (`cnt`, `nit`),  
&nbsp; CONSTRAINT `conta23_ibfk_5` FOREIGN KEY (`cnt`) REFERENCES `conta32` (`cnt`),  
&nbsp; CONSTRAINT `conta23_ibfk_6` FOREIGN KEY (`cnt`, `codcop`, `documento`) REFERENCES `conta41` (`cnt`, `codcop`, `documento`)  
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1\_spanish\_ci

---

<div class="post-metadata">

**Author:** ![saloaun](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@saloaun](https://forums.percona.com/u/saloaun)\
**Post date:** [June 3, 2020, 2:54pm UTC](https://forums.percona.com/t/percona-mysql-error-error-code-1034-incorrect-key-file-for-table/7475/11 "2020-06-03T14:54:10Z")

</div>

that is the table with the problem

---

<div class="post-metadata">

**Author:** ![saloaun](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@saloaun](https://forums.percona.com/u/saloaun)\
**Post date:** [June 3, 2020, 2:55pm UTC](https://forums.percona.com/t/percona-mysql-error-error-code-1034-incorrect-key-file-for-table/7475/12 "2020-06-03T14:55:19Z")

</div>

Server version: 8.0.18-9 Percona Server   
xtrabackup version 8.0.9

---

<div class="post-metadata">

**Author:** ![saloaun](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@saloaun](https://forums.percona.com/u/saloaun)\
**Post date:** [June 3, 2020, 3:03pm UTC](https://forums.percona.com/t/percona-mysql-error-error-code-1034-incorrect-key-file-for-table/7475/13 "2020-06-03T15:03:10Z")

</div>

the size of the table conta23 is 12GB

---

<div class="post-metadata">

**Author:** ![saloaun](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@saloaun](https://forums.percona.com/u/saloaun)\
**Post date:** [June 3, 2020, 3:58pm UTC](https://forums.percona.com/t/percona-mysql-error-error-code-1034-incorrect-key-file-for-table/7475/14 "2020-06-03T15:58:55Z")

</div>

and this is the ouput when i try to import:mysql\> alter table conta23 import tablespace;  
ERROR 1034 (HY000): Incorrect key file for table ‘conta23’; try to repair it  
mysql\> show warnings;  
±--------±-----±-----------------------------------------------------------------------------------------------------------------------------------------------------+  
| Level&nbsp;&nbsp; | Code | Message&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |  
±--------±-----±-----------------------------------------------------------------------------------------------------------------------------------------------------+  
| Warning | 1810 | InnoDB: IO Read error: (2, No such file or directory) Error opening ‘./contabilidad/conta23.cfg’, will attempt to import without schema verification |  
| Warning | 1816 | InnoDB: ALTER TABLE `contabilidad`.`conta23` IMPORT TABLESPACE failed with error 39 : ‘Data structure corruption’&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |  
| Error&nbsp;&nbsp; | 1034 | Incorrect key file for table ‘conta23’; try to repair it&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |  
±--------±-----±-----------------------------------------------------------------------------------------------------------------------------------------------------+  
3 rows in set (0.01 sec)

---

<div class="post-metadata">

**Author:** ![saloaun](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@saloaun](https://forums.percona.com/u/saloaun)\
**Post date:** [June 3, 2020, 4:24pm UTC](https://forums.percona.com/t/percona-mysql-error-error-code-1034-incorrect-key-file-for-table/7475/15 "2020-06-03T16:24:39Z")

</div>

and if u do the process with any other table of database all is ok check:  
mysql\> use contabilidad;  
Database changed  
mysql\> alter table conta04 discard tablespace;  
Query OK, 0 rows affected (0.16 sec)  
  
mysql\> exit  
Bye  
[root@c0515-02-250 contabilidad]# cp conta04.ibd /var/lib/mysql/contabilidad/  
[root@c0515-02-250 contabilidad]# chown -R mysql:mysql /var/lib/mysql/contabilidad/conta04.ibd  
[root@c0515-02-250 contabilidad]# mysql -u querix -p  
Enter password:  
Welcome to the MySQL monitor.&nbsp; Commands end with ; or \g.  
Your MySQL connection id is 24  
Server version: 8.0.18-9 Percona Server (GPL), Release 9, Revision 53e606f  
  
Copyright (c) 2009-2019 Percona LLC and/or its affiliates  
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.  
  
Oracle is a registered trademark of Oracle Corporation and/or its  
affiliates. Other names may be trademarks of their respective  
owners.  
  
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.  
  
mysql\> use contabilidad;  
Reading table information for completion of table and column names  
You can turn off this feature to get a quicker startup with -A  
  
Database changed  
mysql\> SET FOREIGN\_KEY\_CHECKS=0;  
Query OK, 0 rows affected (0.00 sec)  
  
mysql\> alter table conta04 import tablespace;  
Query OK, 0 rows affected, 1 warning (4.14 sec)

---

<div class="post-metadata">

**Author:** ![saloaun](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@saloaun](https://forums.percona.com/u/saloaun)\
**Post date:** [June 4, 2020, 3:20pm UTC](https://forums.percona.com/t/percona-mysql-error-error-code-1034-incorrect-key-file-for-table/7475/16 "2020-06-04T15:20:21Z")

</div>

in mysql.log i can see this error:  
&nbsp;[InnoDB] Page offset doesn’t match file offset: page offset: 262144, file offset: 262144  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

---

<div class="post-metadata">

**Author:** ![rachel\_gomez](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/rachel_gomez/32/7850_2.png) [@rachel\_gomez](https://forums.percona.com/u/rachel_gomez)\
**Post date:** [March 17, 2023, 5:48am UTC](https://forums.percona.com/t/percona-mysql-error-error-code-1034-incorrect-key-file-for-table/7475/17 "2023-03-17T05:48:39Z")

</div>

The following mysqlcheck command checks, optimizes, and auto-repairs all corrupted tables in the “customer” database. The auto repair option automatically fixes a checked table if found corrupted. And the following mysqlcheck command optimizes and auto-repairs all tables in all your MySQL databases.

Regards,  
Rachel Gomez
