How to Run a Mysql Query from Command Line and Write the Output into a File