Re: passing environment variable to an SQL script

2005-02-04 Thread Tom Cunningham
I found an answer: mysql -e "SET @VAR:=1234; SOURCE xxx.sql" -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

passing environment variable to an SQL script

2005-02-01 Thread Tom Cunningham
Hi everybody. I do a lot of maintenance things on the DB by piping SQL files to my MySql DB. What would be very useful is to find a way of passing very simple *arguments* to these scripts. The only way I can think of it is using a nasty trick > mysql --set-variable=wait_timeout=1234 < file.sql