View Full Version : Exec Action Wizard problem

04-01-2003, 03:24 AM
Hello I have a problem where I can't get the installer to execute a SQL script in MySQL properly. I've tried the following:

Command: $W(userInputBean.mysqlDirectory)/bin/mysql.exe

Argument1: -f
Argument2: <
Argument3: script.sql

This only produces the output that mysql.exe gives when you've typed in a faulty argument to it.

Would greatly appreciate help on this.

Jeff Dillon
04-01-2003, 12:01 PM
It looks like you are trying to use "<" to redirect standard input. This is an operation of the shell, not mysql. This means in order to do exactly what you are trying you would have to exec a shell. Something like...

Command: /bin/sh

Arg1: -c
Arg2: $W(userInputBean.mysqlDirectory)/bin/mysql.exe -f < script.sql

The other option is to figure out how to pass a file to the mysql executable.

My point is that < is a stdin redirection for a shell, not a binary.