备份死的MySQL服务器 [英] Backup dead MySQL server
问题描述
我的计算机几乎全部瘫痪,现在我需要从中取出数据,然后再重新安装.我需要备份的数据之一是 mysql 的数据一个>服务器.但是,我无法运行它,所以我只需要知道应该在外部驱动器上复制哪些文件即可.
My computer went almost totally down and I now need to get the data out of it, before I reinstall it. One of the data I need to backup are those on the mysql server. However, I can't run it, so I just need to know, which files should I copy on external drive.
我已经使用xampp 包安装了MySQL .在 xampp 主文件夹的问题中,我可以找到mysql文件夹和其中的以下文件夹:
I have instaled MySQL with the xampp bundle. In the xampp main folder I can find mysql folder and within it, these folders:
..
backup
bin
data
include
scripts
share
sql-bench
其中哪些包含实际的数据库数据?我的空间很有限,因此只需要备份最必要的内容即可.
Which of them contains the actual database data? I'm quite short on space so I need to only backup the most necessary.
推荐答案
尽管应该说,备份是在计算机死机之前进行的,但还是会发生错误.
Although it should go without saying that backups are something you make before your computer dies, mistakes happen.
您应该做的是对驱动器进行映像,将其复制到其他内容,以准备重新安装.我建议您尽可能真实地复制所有内容,即使这需要一段时间.当您意识到自己忘了打捞那些现在已经永远消失的重要事物时,这种感觉就不好了.
What you should do is image your drive, copy it to something else, in preparation for your reinstall. I'd recommend copying everything as authentically as you can, even if that takes a while. That feeling you get when you realize you forgot to salvage something important that is now gone forever is not good.
MySQL通常将数据存储在data
目录中.使您的MySQL恢复到以前的配置可能需要一些工作,因此请务必获取适当的my.cnf
文件.
MySQL generally stores data in the data
directory. It may take some work to get your MySQL back into the same configuration as before, so be sure to grab the appropriate my.cnf
file.
在没有实际运行MySQL进程的情况下,从一堆MySQL数据文件中提取数据确实很困难.这就是为什么存在mysqldump
之类的工具的原因.如果您可以运行它,甚至步前进,也足以对其进行快照.
It can be really difficult to extract data from a bunch of MySQL data files without the MySQL process actually running. This is why tools like mysqldump
exist. If you can get it running, even limping along, that'll be good enough to snapshot it.
这篇关于备份死的MySQL服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!