#1116 Perform a mysqldump when dropping a database

invalid
nobody
5
2013-06-11
2008-09-23
Alan Dee
No

I've done it, we've all probably done it. You go to drop a table and end up dropping the whole database instead. There's no recovery to that: restore from last backup. I've done it twice, once it cost me half a day's work and the other one, done yesterday, I get to start the database from scratch.
I would like to see the system dump the database into a backup file and save it on the file system before it drops the whole database. Thus giving us something to recover from if we didn't actually intend to drop the whole database.

Screen shot:
This shows the layout of how I did it both times. Go into the database, check the two tables you want removed and click to the big "drop" button at the top. Say obscene words, throw keyboard, and then post message about how stupid you are and how you would like those smarter then you to fix your stupidity!

I am willing to make the change myself and submit it.

Discussion

  • Alan Dee
    Alan Dee
    2008-09-23

    Screenshot: drop database accident

     
  • Michal Čihař
    Michal Čihař
    2008-09-25

    You don't read confirmation dialogs? 'You are about to DESTROY a complete database!' is not strong enough warning?

     
  • Marc Delisle
    Marc Delisle
    2008-10-04

    I agree with nijel.

     
  • Marc Delisle
    Marc Delisle
    2008-10-04

    • status: open --> closed-rejected
     
  • nullbarriere
    nullbarriere
    2009-04-02

    What about a timed recovery period? "DROP DATABASE" could just rename the data directory (i.e. "myimportantdata" becomes "myimportantdata_dropped") and after a configurable time period (default, say, 20 minutes ;) better 14 days) the directory is wiped. So it wouldnt really hurt but help pros like alanbdee.

     
  • Michal Čihař
    Michal Čihař
    2013-06-11

    • Status: closed-rejected --> invalid