mysql export
mysql export is done via select ... into outfilemysql> select ... into INTO OUTFILE 'file_name' FIELDS ESCAPED BY ...
FIELDS ESCAPED BY controls how to write special characters.
If the FIELDS ESCAPED BY character is not empty, it is used as a prefix that precedes following characters on output:
- The FIELDS ESCAPED BY character
- The FIELDS [OPTIONALLY] ENCLOSED BY character
- The first character of the FIELDS TERMINATED BY and LINES TERMINATED BY values
- ASCII NUL (the zero-valued byte; what is actually written following the escape character is ASCII “0”, not a zero-valued byte)
The FIELDS TERMINATED BY, ENCLOSED BY, ESCAPED BY, or LINES TERMINATED BY characters must be escaped so that you can read the file back in reliably.
ASCII NUL is escaped to make it easier to view with some pagers.
REFERRERS
MySqlAdministration
MySqlImport