views:

438

answers:

1

I'm trying to execute this mysql command from a batch file:

mysql -f -utest -ppass db < alter1.sql

However, < is an escape character. I tried nesting it in double-quotes, but the double quotes end up appearing as part of the command.

I even put a carrot (^) in front of it, LOOKS fine in the prompt window, but mysql still gets that ^ passed to it, and doesn't execute the command.

Any suggestions? Thanks!

A: 

you could try

type alter1.sql | mysql -f -utest -ppass db

gjutras