Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I accidentally dropped my MySQL database in PhpMyAdmin, is there a possibility to recover my database?


migrated from Dec 9 '09 at 17:02

This question came from our site for professional and enthusiast programmers.

locked by Tom O'Connor Aug 27 '13 at 7:19

This post has been locked due to the high amount of off-topic comments generated. For extended discussions, please use chat.

Wrong place for this. This actually is a question you should be asking at Serverfault; You may get better responses there. You also need to be a lot more specific - some shared Web servers keep automated snapshots or backups, as do certain NAS devices. – Yoni Samlan Dec 9 '09 at 15:31
MySQL is on my local machine. – Steven Dec 9 '09 at 15:32
@Steven are you using Vista or Win 7? If so you may have volume shadow copy. This takes incremental backups of various directories. You may if you're lucky be able to find a backup of your mysql data directory. – Neil Aitken Dec 9 '09 at 15:52

Sure. You can restore it from your backup.

Otherwise, you're out of luck, unless your ISP has a backup that can restore it. You'll need to talk to them about that, though... They may charge you for doing so.


I just accidentally dropped my database on my local wamp server. It was lost and I felt all hope was gone, but immediately I searched on the internet to find solution, but I did not get. However, I recovered it and here is how I did it. I went to the folder where phpmyadmin stores the raw data of my databases in my case "C:\wamp\bin\mysql\mysql5.1.32\data" then I noticed that the folder for my dropped database was not there, which means it is gone forever (not really). What I did next was to right-click inside the "data" folder window and I selected "properties" and clicked the "Previous Versions" tab. In that tab there was a list of previous versions with dates, so I selected the one I wanted, in my case I selected the previous version of the "data" folder which was 2 hours earlier. then I clicked "Restore" then it restored back the folder. During the process you might get a pop-up that says restore can not complete as the folder is used by another process, don't worry, just go and stop the local server service and click "try again". I hope this helps someone. then copy and paste the folder to the data directory and that is it

This, of course, depends upon your system having the Volume Shadow service running and configured. – jscott Jul 20 '11 at 10:37
I'm not aware that it even has to be configured. I've used vista and win 7 and it has had the feature by default. never ever had to configure anything. In fact i used to ignore that feature until yesterday when I almost lost a client's work which was due for delivery in a couple of hours from that time. – Mark Jul 20 '11 at 23:37
If you installed MySQL standalone, you can find the data file in C:\ProgramData, a hidden folder on Windows 7. I also don't remember setting up shadow copy, but I have it turned on, fortunately! – Jake Jan 29 '15 at 6:37

If you have a backup of the DB, or if your PC / Server has some kind of file system snapshot like DFS or Volume Shadow Copy (found in Vista), then yes there is some hope.

Otherwise, nope. Your DB is gone.

DFS doesn't have anything to do with system snapshots. – MDMarra Jun 9 '12 at 21:47

nope, when drop at table, you drop it from a 10 miles high cliff.

I hope for you you've made a back-up or make use of an other back-up solution that automatic backs it up every day or so.


Short answer: no.