File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ant target to create a database in mysql

 
Pranav Butala
Greenhorn
Posts: 27
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to design an ant target that will create a database in MySQL ?
The target depends on configure target that gets all JDBC info
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think so. Have a look at the <sql /> task - which is just a way for Ant to run SQL against an RDBMS through JDBC. I say I think so because I've never tried to create a DB this way. I can't remember if MySQL JDBC connections strings require a database name - which would obviously be an issue if the DB doesn't exist yet. Check the Ant docs for what you need to make this work.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic