I would like to run a query using SSH and export those results to a csv file.
I can connect to the DB using SSH and run the query, but how do I get it to output the results to a file vs screen output?
Connect to MySql vis SSH
Query select first,phone from tablename where active='y'
output to leads.csv
Thanks in advance