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
2009-04-01 01:32:22
Just what I was looking for, thanks.
Peter Kelley
2009-04-01 03:20:03
+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
2009-04-01 01:33:16