This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases 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 and Relational Databases
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
 
It's not a secret anymore!