Pete Freitag Pete Freitag

MySQL ERROR 1016 (HY000): Can't open file

Updated on April 15, 2024
By Pete Freitag

I just got this error message on one of my mysql databases. It sounds kind of bad, but to fix it I just ran the following SQL statement, and all was well:

REPAIR TABLE tablename

The error might look like on MyISAM tables:

ERROR 1016 (HY000): Can't open file: 'tablename.myi' (errno: 1)

Or like this on InnoDB tables:

ERROR 1016 (HY000): Can't open file: 'tablename.InnoDB' (errno: 1)

Keep in mind that you should make a backup first before running the REPAIR TABLE statement. The MySQL documentation states that under some circumstances the operation (REPAIR TABLE) might cause data loss.



mysql errors

MySQL ERROR 1016 (HY000): Can't open file was first published on August 16, 2005.


Discuss / Follow me on Twitter ↯