下面是我用来创建数据库的制表符分隔备份的代码。
mysqldump --user=**** --fields-enclosed-by=\" --lines-terminated-by="\n" --password=**** --host=localhost --tab=/path/to/folder ****
我不能去工作的是:
--lines-terminated-by="\n"
目前,如果我的 MySQL 数据库中有一个 TEXT 列,它会输出如下:
"1" "A test post" "This is an example of text on multiple lines.
\
As you can see this is how it places it in the txt file.
\
Blah blah blah"
"2" "Another post" "More text....."
这就是我想要达到的目标
"1" "A test post" "This is an example of text on multiple lines.\nAs you can see this is how it places it in the txt file.\nBlah blah blah"
"2" "Another post" "More text....."
根据文档,--lines-terminated-by=...
使用输出时支持--tab
。但我似乎无法让它工作。