title: MySQL syntax problem in "SELECT * FROM INTO FILE"
body: <p>I'm trying to move tables between two databases and I'm using this command that is given by MySQL :</p>
  
  <pre><code>SELECT * 
    INTO OUTFILE '/tmp/result.txt' 
    FIELDS TERMINATED BY ',' 
    OPTIONALLY ENCLOSED BY '"'  
    LINES TERMINATED BY '\n' 
   FROM test_table;
  </code></pre>
  
  <p>As it is written in the MySQL Dev Manual. I'm using MySQL 5.1.</p>
  
  <p>Error :</p>
  
  <blockquote>
    <p>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)</p>
  </blockquote>
  
  <p>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.</p>
  
  <p>Please don't suggest alternatives, I just want this method to work.</p>