恢复已删除的 MySQL 行?
情况是我从数据库中删除了行,现在想要恢复它们。
没有二进制日志,也没有备份。
但据我所知,记录不会立即删除,它们只是被标记为“已删除”,但实际上只有在下次优化后才会删除。
我刚刚将所有数据库文件复制到安全的地方:frms、MIY 和 MYD。我知道我感兴趣的表的结构;我什至可以找到所有已删除的行 ID。
有没有工具可以恢复最近删除的行?
The situation is that I deleted rows from the database and now they are wanted back.
There are no binary logs, and no backup.
But as I know records are not deleted instantly, they're just marked as 'deleted', but they're actually deleted only after next optimisation.
And I have just copied all the database files into safe places: frms, MIYs and MYDs. I know the structure of table I'm interested in; I can even find all deleted row ids.
Is there any tool to recover recently deleted rows?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您碰巧知道删除的行的数据偏移量(或知道一些唯一的字符串),则继续弹出打开十六进制编辑器并手动复制(二进制)数据。如果您确实恢复了所有内容,您将非常幸运,我希望您写一篇关于它的文章,因为坦率地说,我不相信这是可能的。
If you happen to know the offset of the data (or know some unique string) for the rows you deleted, then go ahead an pop open a hex editor and copy the (binary) data by hand. If you do recover it all you'll be extremely fortunate, and I hope you write up an article on it, because frankly I don't believe this is possible.