I\'m trying to write the results of a query to a file using mysql. I\'ve seen some information on the outfile construct in a few places but it seems that this only writes the fi
mysql -v -u -c root -p < /media/sf_Share/Solution2.sql 2>&1 > /media/sf_Share/results.txt
This worked for me. Since I wanted the comments in my script also to be reflected in the report I added a flag -c