tags:

views:

110

answers:

2

I'm looking for a tool that lets me replicate the database export and import functionality from PHPMyAdmin so that I can copy a production database to test in a build script (Gradle or Ant).

+3  A: 

Not sure if this is exactly what you need, but I've used Apache's DDLUtils library to do similar things in the past. For my project, we actually needed to move both the schema AND data from MySQL to JavaDB and this library made it pretty straightforward.

Outlaw Programmer
Just what I was looking for, thanks.
Peter Kelley
+2  A: 

Are you doing this for unit testing? You can use dbUnit, which has an export to XML feature - the XML can then be used to load tables before you run tests. Not sure this is what you're looking for, but hopefully it gives you something to explore.

Todd R