Reputation: 13860
I accidently deleted the whole database when I should just delete one table in PHPMyAdmin. Is there a way of retrieving the database?
Upvotes: 7
Views: 68779
Reputation: 80
Same thing happened with me, found a easy solution. First make a command line access to the database using the mysql.exe
file present in xampp/php/bin
folder. Delete the phpmyadmin
database. Then, just import the create_tables.sql
file to the phpmyadmin database
. This solved my problem.
Let me know if you face any problem using this.
thanks.
Upvotes: 1
Reputation: 11
Same thing here :-(
I closed xampp (V3.2.1) found the xampp\mysql\ folder, right-clicked and selected Restore previous version, select recent restore. When this finished I opened xampp and the missing database was back with the information dated as per the restore date. Not ideal but better than no database :-)
Upvotes: 1
Reputation: 22956
You can retrieve a accidentally deleted database via a file restoration software. Check this free software
http://www.majorgeeks.com/Restoration_d4474.html
More information here - http://emaillenin.blogspot.com/2010/11/recover-accidentally-deleted-mysql.html
Upvotes: 0
Reputation: 86585
There are two ways:
As for doing it with MySQL, though...on all systems i'm aware of, no. MySQL tables are files in the server's data directory, and dropping a table deletes those files. Once they're gone, they're gone, and only the methods above can get them back. A database is a directory of those files, and dropping it deletes the whole directory.
Upvotes: 7