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. 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 had to recover a database with a some months old full backup. I have however in my possession a most recent but unfortunately incomplete SQL dump for this same database done with mysqldump.

Is there any tool out there that will allow me to compare my SQL dump with the live database and import any new data?

share|improve this question

I guess you should import both dump's to MySQL Server, and then use

share|improve this answer

import your dump with INSERT IGNORE OPTION (skip duplicates)

on your dump file (assuming you're using linux OS)

cat /path/dir/to/dumpfile.sql | sed s/"^INSERT"/"INSERT IGNORE"/g > /path/dir/to/newdump.sql

then issue import

mysql -u username -p databasename < /path/dir/to/newdump.sql

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.