My centOS 7 server had an unexpected shutdown. For some reason one of the mysql database shows that all tables are empty, but if I browse the files in /var/lib/mysq/database I can see the files(.frm and .ibd and the other files) opening them with a text editor I can read some of the data in it.

What's wrong here? why is one of my database not reading the files or loading the data?

Edit: I still have all my files related to the database such as ibdata1, all other databases/schemas are working fine except for one. That one database I can browse the tables but loading the data shows empty tables.

  • Look at the log files. They may tell you that it crashed in a bad way and point you at a web page that explains how to "recover" the data. Do not try to edit any files.
    – Rick James
    Jan 24, 2020 at 23:56

1 Answer 1


First attend to the error for which the server had unexpected shutdown. Without attending this you can not move ahead.

And then for the database / tables missing data...

1. Log files are to start with.

Find the date/time range in which those particular .frm and .ibd files and the ibdata1 are last updated (not last accessed) and look for all entries of all relevant log files. Hope you can check all relevant...

Once the lines of log files with issues are identified, you yourself can correct them or else just post them here

2. Look at https://dev.mysql.com/doc/refman/5.7/en/repair-table.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.