How to preserve line breaks when exporting MySQL data to a CSV file?
问题 I need to export some data from mysql to a csv file. But one of the columns have line breaks and I need to export the data to a csv file saving break lines. At this moment I am using the following sql query: select username, description from users into outfile '/tmp/test.csv' FIELDS ESCAPED BY '"' TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\n'; But that sql query doesn't save break lines in the csv file. I am not an expert with MySQL, if someone could help me I'd be