Using mysql in Batch Mode
In the previous sections, you used mysql interactively to enter queries and view the results. You can
also run mysql in batch mode. To do this, put the commands you want to run in a file, then tell mysql
to read its input from the file:
shell mysql mysql -e "source batch-file"
If you need to specify connection parameters on the command line, the command might look like this:
shell mysql -h host -u user -p ... zobacz całą notatkę