-1

today I crashed my linux kernel, and I was only able to get the data folder from my MySQL directory, which uses InnoDB.

How can I recover all the data? I googled like 2 hours already, none of the solutions seemed to work unfortunately, that's why I ask here now.

Problem solved, I had the wrong MySQL-Server version (5.5), which is being offered by the official Debian package servers. I've added the official MySQL-Package server to my sources.list, and installed mysql-server-5.7, and then went step by step through this tutorial: https://www.voxteneo.com/restoring-tables-mysql-database-frm-ibd-files-available/

PS: Thanks for downvoting me for absolutely no reason. I rarely ask here something. I only do it, if I really can't find a solution.

jerr0w
  • 21
  • 4
  • if you have the entire datadir, and know the MySQL version, (at least the major version), and preferably the configuration, you should be able to recover it. First rule of recovery, don't delete anything/let anything be overwritten until you have it all functional. – danblack Sep 28 '18 at 10:13
  • If something 'doesn't work' you should clearly state what you tried and what the response is. – danblack Sep 28 '18 at 10:14
  • Hi, I went through the comments of this question: https://stackoverflow.com/questions/26868956/restore-table-structure-from-frm-and-ibd-files – jerr0w Sep 28 '18 at 10:45
  • unfortunately, it doesn't work, because I always get "ERROR 1030 (HY000): Got error -1 from storage engine" – jerr0w Sep 28 '18 at 10:46
  • It seems like I had the wrong server version. I had 5.5, I installed mysql-community-server (which is v5.7) and it works now. – jerr0w Sep 28 '18 at 11:22

2 Answers2

0

Data recovery requires the entire datadir, and an equivalent MySQL major version.

An identical configuration of storage related settings will aid the recovery significantly.

danblack
  • 12,130
  • 2
  • 22
  • 41
0

Your google skills need significant improvement. https://www.google.com/search?q=mysql+recover+corruped+database&oq=mysql+recover+corruped+database&aqs=chrome..69i57j0l2.12079j0j7&sourceid=chrome&ie=UTF-8 gives https://twindb.com/recover-corrupt-mysql-database/ in a second link with a tool and tutorial.

Besides, this question was answered here many times.

akuzminsky
  • 2,190
  • 15
  • 21
  • As said in the comments, it was about the MySQL Server version. The debian package-servers are still offering mysql-server-5.5 only, while I needed mysql-server-5.7, which I got through the official mysql repo. https://www.voxteneo.com/restoring-tables-mysql-database-frm-ibd-files-available/ this worked for me, btw. – jerr0w Sep 29 '18 at 15:04