MySQL Errors Incorrect key file for table xxxxxxxxxxxxxxx
search cancel

MySQL Errors Incorrect key file for table xxxxxxxxxxxxxxx

book

Article ID: 381427

calendar_today

Updated On:

Products

Network Observability

Issue/Introduction


MySQL reports 'Incorrect key file for table' errors for bucket tables in the reporting database.

 

$SPECROOT/mysql/bin/MYSQL.OUT

2024-11-05T23:19:10.077871Z 68 [ERROR] [MY-013134] [Server] Incorrect key file for table './reporting/alarmbucket100663296_1688200091453.MYI'; try to repair it

2024-11-05T23:19:24.146326Z 67 [ERROR] [MY-013134] [Server] Incorrect key file for table './reporting/modelavailbucket100663296_1688200091427.MYI'; try to repair it

Resolution


Attempt to repair the table(s) using mysql client.


cd $SPECROOT/mysql/bin/
./mysql --defaults-file=../my-spectrum.cnf -uroot -p<passWord> reporting -A


REPAIR TABLE alarmbucket100663296_1688200091453 USE_FRM;
REPAIR TABLE modelavailbucket100663296_1688200091427 USE_FRM;

Additional Information


mysql> REPAIR TABLE alarmbucket100663296_1688200091453 USE_FRM;
+----------------------------------------------+--------+----------+-----------------------------------------+
| Table                                        | Op     | Msg_type | Msg_text                                |
+----------------------------------------------+--------+----------+-----------------------------------------+
| reporting.alarmbucket100663296_1688200091453 | repair | warning  | Number of rows changed from 0 to 299438 |
| reporting.alarmbucket100663296_1688200091453 | repair | status   | OK                                      |
+----------------------------------------------+--------+----------+-----------------------------------------+
2 rows in set (8.19 sec)



mysql> REPAIR TABLE modelavailbucket100663296_1688200091427 USE_FRM;
+---------------------------------------------------+--------+----------+------------------------------------------+
| Table                                             | Op     | Msg_type | Msg_text                                 |
+---------------------------------------------------+--------+----------+------------------------------------------+
| reporting.modelavailbucket100663296_1688200091427 | repair | warning  | Number of rows changed from 0 to 2552593 |
| reporting.modelavailbucket100663296_1688200091427 | repair | status   | OK                                       |
+---------------------------------------------------+--------+----------+------------------------------------------+
2 rows in set (50.63 sec)

mysql>