Take the 2-minute tour ×
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.

I'm using MySQL db.

I want to dump a set of rows from one table and if these rows have foriegn keys that point to rows on some other tables, I want to dump those too.

Then I want to load these dumps into their respective tables on a different database (e.g using LOAD DATA INFILE command). So simply using select...join...into outfile is not enough since the result would be one big joined table.

For example table A has B_id and C_id columns that point to rows on table B and C respectively. So when I dump 3 rows from table A, 3 related rows from B and 3 from C are dumped too.

Does such a tool/script exist?

Writing a script to do that is very doable, but I don't want to reinvent the wheel if such a tool already exist.

share|improve this question
add comment

1 Answer

I think Jailer is what you are looking for:

http://jailer.sourceforge.net/

(Though I haven't used it so far)

share|improve this answer
    
+1 for a very nice looking tool. Will have to check it out. –  Derek Downey Apr 20 '12 at 14:42
add comment

Your Answer

 
discard

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.