Is there a way to undo the drop database command in phpmyadmin?
So I launched phpmyadmin, the tool to manage MySQL tables and databases.
Looking through the list of tables in the database, one of the tables seemed to have corrupted and malfunctioned. This must be the reason why the plugin is not working. Photo by Zach Klien
So I thought, maybe I’ll just delete the table and reactivate the plugin. This trick should give me a new table altogether.
I proceeded to delete the table without thinking twice. Anyway, it’s 1 am in the morning, why bother thinking and double checking. So I checked the table which I wanted to delete, then clicked on the DROP button. When the dialog box pops up, without reading I just clicked on the OK button.
BAM! WHAM! DAM!
Looking through my list of database on the left side bar, I realized thatmy entire database is GONE. I have just done the unthinkable. I just dropped the entire database instead of deleting just one table which was what I had in mind. Best part, I haven’t done any backups to the database. Ouch!
Immediately, I kinda woke up. It’s like I was being controlled by something else and didn’t know what I was doing. No use crying over spilled milk now. My few days of work just went down the drain and thoughts of having to redo and repeat the entire process all over again made me feel sick and bored.
Then i thought, maybe there is a way to undo the drop database command in phpmyadmin. There must be a way out for DODOs like me.
Searching through Google, I actually found NOTHING! Yea… you read me right. No solution to this mistake.
But if any of you readers out there do know of a way to undo the drop database command, please let us know. Even if there are any third party tools capable of undoing and recovering the database, it would be really helpful.
Googling further, someone actually recommended that we try to contact our web host about this. If they are really good and reliable, they would have done daily backups and be able to restore it for us without any cost.
So I headed over to my web hosting site (WESTHOST) where they have a 24 hours technical support.
Chatting online with Westhost’s technical support staff, I mentioned to him about my dropped database. He asked for a few verification questions. Once I answered him and told him which database was dropped, within 2 minutes my database was restored up to yesterday nights version.
Phew! What a relieve. Nothing was lost, except for a couple of updates I did a few hours ago. I learned a few lessons:
- Always backup whenever possible
- Never to mess with files and databases in the middle of the night
- It’s important to host my files and databases with a reliable web host such as Westhost
Good job Westhost! To anyone encountering the same problem and your database is not backed up in anyway, the only thing I can say is… I FEEL your PAIN.
Thanks for reading! Read more articles by Bob Lee :)