Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

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

One of our users has deleted a table by mistake. How can I restore only that table?

share|improve this question
The answer to this problem would depend on 1. the table engine (myisam or innodb) you are using, and 2. the type of backup method that you are using (text backups or binary backups). If you can answer these two questions then only would I be able to tell you the exact method of restoring the table. – ovais.tariq May 6 '11 at 12:41

I'm not familiar with MySQL, so don't have a straight line of directions. What I'd do is to restore the last backup (do you have one?) of the database on the same or a different server and copy the missing table table to the main on-line database.

PS: oh, and also remove the write permission for that user :-).

share|improve this answer

If you've got a backup dump of the DB, there's a nice article on the alternatives here.

Most commonly you want to extract the relevant data and exclude data on the rest of the tables.

If you have binlogs, you'll most likely need to create a temporary copy of the whole DB and replay from the last dump.

share|improve this answer

Step1: create a user who has privilege to read / write only that particular drop table in the database.

Step2: restore forcefully from your backup (.sql ) file by logging that user .

Step3: Now check database and that table.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.