aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Ant target to create a database in mysql Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Ant target to create a database in mysql" Watch "Ant target to create a database in mysql" New topic
Author

Ant target to create a database in mysql

Pranav Butala
Greenhorn

Joined: Jan 20, 2004
Posts: 27
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

Joined: Apr 14, 2004
Posts: 10336

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.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ant target to create a database in mysql