简体   繁体   中英

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

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

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.

I would really appreciate if you can guide me as to what would be the best way to restore this data on Windows 10.

I was able to find the solution on another answer at stackoverflow. Apologies for double post.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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