Please consider the org-babel block below, where I dump a MySQL table:
#+begin_src sh :results value file :file dump.sql
mysqldump -u root -h 0.0.0.0 -P 49321 -proot db_name tbl_name
#+end_src
Running this command in my terminal gives me the output I expect: the raw SQL that I can redirect into a file. However, when I run it in that babel block, the file "dump.sql" contains only the character "2".
Changing the collection option to "output" makes emacs complain that it "Couldn't execute 'SELECT COLUMN_NAME,...". I'm sure there is some combination of results options that would give me what I want, but they elude me at the moment.