MySQL Output Files
From A2Wiki
You can use the command line mysql client to create mysql output files that can be accessed. If you execute:
> mysql -u [username] -B -e "sql statement" [database name] >example.txt
That will output the results tab delimited to the example.txt file.
