I have a mysql database, and today I woke up and noticed that some of my tables are empty (like if they were truncated) but some aren't. This is not an SQL injection since I took care of that, but still haven't figured out what really happened.

Now I need to recover that data that was deleted, but the only thing I have are the lib files, so, is there a way to recover a database data using those files? We never deleted any file.

Basically I have ib_logfile, ibdata files but I never enabled Binary Logging.

  • Show the method you used to determine that they were empty.
    – Rick James
    Jan 25, 2019 at 1:40

1 Answer 1


if your MySQL contains binary logs then you can try mysqlbinlog to generate .sql file and execute insert the missing data manually example:

mysqlbinlog binary_log_file > query_log.sql

Your Answer

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

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