einstein
einstein

Reputation: 13860

Retrieve a deleted database in PHPMyAdmin

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

Answers (4)

Dinesh Sahoo
Dinesh Sahoo

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

user3297988
user3297988

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

Raj
Raj

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

cHao
cHao

Reputation: 86585

There are two ways:

  • Have a working backup of the system, and restore the files from it.
  • An undelete tool might help, if you deleted the db very recently (and ideally, if you unplugged the computer right afterward).

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

Related Questions