Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass parameters to MySQL batch files ?!?

Status
Not open for further replies.

tjeerd

Technical User
Nov 5, 2001
1
NL
Hi,

I’m new to MySQL so don’t kill me for my limited knowledge (and probably stupid question :) I’m running MySQL (version 3.23.36) using Red Hat Linux 7.1.

I’m using a Linux bash script with commands like this:
Mysql < MySQL_Batch

The MySQL_Batch file has a command like:
LOAD DATA LOCAL INFILE “file.txt” INTO TABLE Raw;

Is it possible to pass parameters from my Linux bash script into my MySQL Batch file? For instance I don’t want to use “file.txt” all the time but change to “file2.txt” when I like it?

Kind regards,
Tjeerd Talman (Amsterdam, The Netherlands);
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top