Restore Database in WAMP

≯℡__Kan透↙ 提交于 2019-12-20 03:11:48

问题


I had few databases related to different projects in the WAMP. I don't know what happened, Today, when I go to PhpMyAdmin, I was just able to see the default databases and rest of my databases are not showing and even the php code related to those databases are throwing database not found errors. But when I go to "D:\wamp\bin\mysql\mysql5.1.30\data" the folders with my DB names are there. But not sure how to restore those DBs and I don't have any backup of the DB, Can any one help me how to restore them?


回答1:


You can copy these file to another location and reinstall the same WAMP version after installtation copy them back to original location. Please note that your WAMP version should be same, because if the version will change then mysql version will also be change.




回答2:


Another method is to utilise Window's "Restore previous versions" feature. Right click the wamp folder (usually in C:\, click Restore previous versions and select the most recent date you know it was working.

Note: This will also revert mysql data - so you'll lose any changes after the date you select, but I have used this in the past when I needed to get my whole wamp system back to a working state when something had broken it.




回答3:


Have you checked my.ini file? Just find datadir it should refer to db folder (e.g datadir=D:/Wamp/bin/mysql/mysql5.1.30/data) - goodluck :)




回答4:


Copy the complete data folder from old wamp mysql folder to new mysql folder and then inside data folder change the name of the file mysql-bin.index to mysql-bin.index-corrupt. Then restart WAMP. That's all.




回答5:


reinstall Wamp Server that must be same version. After reinstall if wamp show red icon 1. go to wamp -> apache -> services ->test port 80. if its available . then apache -> services -> install services. 2. mysql-> services -> install services. after that restart wamp.. 100% work




回答6:


Copy data folder and reinstall same version of WAMP.
Once installation is completed, go to data folder: inside replace only ibdata1 file from existing folder.
After starting WAMP, check phpmyadmin: you'll get all database and tables with data.



来源:https://stackoverflow.com/questions/10425379/restore-database-in-wamp

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