File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Pass parameters to a mysql sql file from a batch file in windows Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Pass parameters to a mysql sql file from a batch file in windows" Watch "Pass parameters to a mysql sql file from a batch file in windows" New topic
Author

Pass parameters to a mysql sql file from a batch file in windows

Mike Anna
Ranch Hand

Joined: Jul 08, 2007
Posts: 117
I have two files, create_user.bat and create_user.sql This is the content of create_user.bat :


This is the content of the .sql file :



Upon running the bat file, first it gave me this error :


Then I changed this '@P_USER'@'@HOST' to '@P_USER'@'localhost' then I get this error :


I have read similar questions on various forums and I think am following everything. I dont see where I am going wrong. How do I go about fixing this script please?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Pass parameters to a mysql sql file from a batch file in windows