I have a text file with commands to, say, create a table. How do I execute all the instructions in this file? I'm only acquainted with using the prompt.
+2
A:
Do keep in mind that you will also probably need to pass your credentials.
You can always use < operator:
$ mysql < your_file.sql
Pablo Santa Cruz
2010-06-04 19:12:49
`mysql db_name < your_file.sql` is also useful sometimes
Dmitry Yudakov
2010-06-04 19:19:48