wood burning stoves 2.0*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Pass parameters to a mysql sql file from a batch file in windows
 
Similar Threads
Unable to drop user in mysql
mysql JDBC driver classpath problem.
Problem with Connecting to mysql using java
Help - - - ClassNotFoundException: com.mysql.jdbc.Driver
Tomcat Connection pool creating too many connections, stuck in sleep mode