Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Mike Anna
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!