I want to export the result of a query selectwith two columns to a file csv. I do not have phpmyadmin or such tools. I need to run my request directly from the console. Can someone give me a hint how can I do this?
select
csv
You can try using this command:
SELECT field_1,field_2 FROM table_name INTO OUTFILE '/tmp/output.csv' FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';