File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Running mysql script using ant

 
Micale Raj
Ranch Hand
Posts: 30
Hibernate IntelliJ IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have following questions ( may be these could be very elementary , but i appreciate if someone could answer them ).

1. How to create mysql database, tables, etc ( included in mysql script ) using ant ?
2. What is the best driver to connect to mysql from my ant script ?
( i found use of "org.gjt.mm.mysql.Driver" in one tutorial. Are there any other drivers which could you for same purpose . i.e to connect to mysql )

Thanks !
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) The best way is using the Ant SQL task: http://ant.apache.org/manual/Tasks/sql.html

2) That is the old name of the driver class - don't use it any more. Instead, use com.mysql.jdbc.Driver (I assume you already know you need the driver JAR file in your classpath...)
 
Micale Raj
Ranch Hand
Posts: 30
Hibernate IntelliJ IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much for you reply..Yes I know how to add jar to classpath and I will follow the apache ant manual.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic