Backup dead MySQL server

青春壹個敷衍的年華 提交于 2019-12-12 03:06:16

问题


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.

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.


回答1:


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 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.

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.



来源:https://stackoverflow.com/questions/20130706/backup-dead-mysql-server

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!