简体   繁体   English

从“ C:\\ xampp \\ mysql \\ data”文件夹的备份中还原SQL数据库

[英]Restore SQL database from backup of “C:\xampp\mysql\data” folder

Recently my laptop crashed and while making a backup of the XAMPP instead of taking a backup of the entire XAMPP folder I just copied the 最近,我的笔记本电脑崩溃了,在备份XAMPP而不是备份整个XAMPP文件夹时,我只是复制了

"C:\\xampp\\mysql\\data" “ C:\\ xampp \\ mysql \\ data”

folder. 夹。 Now I am trying to restore the old database, the issue is if I try to just paste the folder of the database (Eg database folder named 'X123' - it cotains both ibd and frm files), then X123 shows up in PHPMyadmin but doesn't work as when I click on the table it says 'table doesnt exist'. 现在,我正在尝试还原旧数据库,问题是如果我尝试仅粘贴数据库文件夹(例如,名为“ X123”的数据库文件夹-它包含ibd和frm文件),则X123出现在PHPMyadmin中,但没有就像当我单击表格时说“表格不存在”一样。 I read other answers which suggested that I also replace the following files 我阅读了其他答案,表明我也替换了以下文件

ibdata1, ib_logfile1, ib_logfile0

When I try to do the same, MySQL simply stops working. 当我尝试执行同样的操作时,MySQL只会停止工作。

I have tried fixing the errors after reading some of the related answers here by importing the create_tables.sql file from "C:\\xampp\\phpMyAdmin\\examples" and some other stuff but nothing seems to work. 通过从"C:\\xampp\\phpMyAdmin\\examples"和其他一些内容导入create_tables.sql文件,在阅读了一些相关的答案后,我尝试修复错误。但似乎没有任何效果。

I would really appreciate if you can guide me as to what would be the best way to restore this data on Windows 10. 如果您能指导我什么是在Windows 10上还原此数据的最佳方法,我将不胜感激。

I was able to find the solution on another answer at stackoverflow. 我能够在stackoverflow的另一个答案上找到解决方案。 Apologies for double post. 道歉的双重职位。

https://stackoverflow.com/a/46970116/9879647 https://stackoverflow.com/a/46970116/9879647

In my case I also had to edit php.ini so as to increase the max execution time as well as file size that can be imported. 就我而言,我还必须编辑php.ini,以增加最大执行时间以及可以导入的文件大小。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM