Export result of query from mysql console to CSV file

Sure all GUI DB tools can do export of result of query into CSV file. But what if you have to do this from command line? There is a simple way perform that task. Here is an example: SELECT * INTO OUTFILE ‘/tmp/products.csv’ FIELDS TERMINATED BY ‘,’ ENCLOSED BY ‘”‘ ESCAPED BY ‘\\’ LINES TERMINATED BY ‘\n’ FROM products When you run that query all […]

Read Me 2 Comments