Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I'm not sure if this is the right subforum, but here it is.
After automatic update of mysql, I lost all tables in a database. I can't see them from console or phpMyAdmin. But when I go to /var/lib/mysql there it is 300MB directory. What happend and how can I get this database back?
I tried repairing with mysqlcheck, but nothing happened.
Automatic update is performed by cPanel and I guess it executes that command after updates. Nevertheless, I just tried with those and still nothing. No tables. Perhaps it wasn't due to update, but I have no idea why this happened.
Since all .frm files were gone, I managed to find some old backup. I restored old backup and that way restored tables definition. Then I copied new .MYD and .MYI over this restored, while retaining .frm's. Last step was repairing database with mysqlcheck -r and everything was working like before.
Yep, that was the next step. Restoring the actual .MYI and .MYD files is sketchy but it can work. The fact that you were getting no info when doing the query against your info schema table confirms that the issue is with your .frm files which tell the MySQL database your table info. Just wanted to add this follow up for anyone else that runs into the issue. This is the last step you can attempt before you are up the creek so to speak.