Link to home
Start Free TrialLog in
Avatar of gateguard
gateguard

asked on

mysql command line input file? (similar to osql -i ?)

I'm used to running osql against microsoft sql server and one of the options I often use is -i <file> which allows me to build a command file and then run it by name with a single osql command.

Is there something like that in mysql?

I see there is INFILE but that appears to me to be data input, not command input.

Is there some way I can execute a command like:

mysql -u root --password=xxxx -i <command input file>

where the <command input file> is read and all the sql commands in that file are run?

Thanks.

ASKER CERTIFIED SOLUTION
Avatar of Gunter17
Gunter17
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial