I'm trying to move tables between two databases and I'm using this command that is given by MySQL :
SELECT *
INTO OUTFILE '/tmp/result.txt'
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY '\n'
FROM test_table;
As it is written in the MySQL Dev Manual. I'm using MySQL 5.1.
Error :
Error Code: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\n'' at line 1)
I'm getting a problem every time I run it. It it says that there is a syntax error becasue of '\n' ? What is the solution to this problem ? I'm using MySQL Workbench to query the database. I tried the command line, IT gives the same error.
Please don't suggest alternatives, I just want this method to work.