title: select from mysql view into outfile
body: <p>I'm having trouble to select data from view in mysql to outfile. </p>
  
  <pre><code>SELECT *
  INTO OUTFILE '/tmp/test.txt'
  FROM test_view;
  </code></pre>
  
  <p>I'm getting the following error:</p>
  
  <blockquote>
    <p>ERROR 1356 (HY000) at line 1: View 'test_view' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them</p>
  </blockquote>
  
  <p>When I only use the following in sql, it's fine.</p>
  
  <pre><code>SELECT *
  FROM test_view;
  </code></pre>
  
  <p>I'm using mysql version: 5.1.69</p>
  
  <p>Thanks.</p>