从数据文件恢复mysql数据库
最近我的一个服务器操作系统死机了。我只剩下存有数据的磁盘了。不幸的是,不久前,带有数据库备份的磁盘被意外格式化。 所以现在我希望我能找回我的数据库(不仅是表结构,还有数据),但我真的不知道如何! 我找到了数据.FRM文件,但它们似乎不包含所有数据,因为它们不超过10 KB大,整个数据库超过3 GB。
我也读过一些有关检索 .MYD 和 .MYI 文件的内容,但我找不到这些!只有.FRM 文件..
谁能告诉我该怎么做?
[编辑] 我无法在 data/tablename 文件夹中找到 .MYD 和 .MYI 文件。我不知道他们是否应该在那里,但如果没有,我不知道在哪里可以找到他们,所以也许有人也可以帮助我。
Recently one of my server's OS died. I only have the disk with the data left. Unfortunately the disks with the database backup was formatted by accident not long before that.
So now I'm hoping I can get my database back (not only table structures but also data), but I don't really know how!
I found the data .FRM files, but they don't seem to contain all the data, as they're not more than 10 KB big, and the entire database was over 3 GB.
I read something about retrieving the .MYD and .MYI files as well, but I can't find those! Only .FRM files..
Can anyone tell me what to do?
[EDIT] I wasn't able to find the .MYD and .MYI files in the data/tablename folder. I don't know if they're supposed to be there, but if not I don't know where to look for them, so maybe someone could help me out with that as well.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该查看 ibdata1 文件,该文件应该是 MySQL 服务器的真实数据。几周前,我设法从该文件和 .frm 文件恢复数据库。
一般来说这个文件位于/var/lib/mysql
You should look at
ibdata1
file which should old the true data of a MySQL server. Some weeks ago I managed to recover a database from that file plus .frm files.Generally this file is in /var/lib/mysql