title: output cmd line sql to csv
body: <p>Im trying to export some stuff into csv using</p>
  <pre><code>mysql&gt; select
      -&gt; sku,
      -&gt; qty,
      -&gt; shelf_location,
      -&gt; notify_stock_qty as warning_stock_level,
      -&gt; use_config_notify_stock_qty as use_config_warning_stock_level,
      -&gt; ideal_stock_level,
      -&gt; use_config_ideal_stock_level
      -&gt; from
      -&gt; catalog_product_entity
      -&gt; inner join cataloginventory_stock_item on entity_id = product_id
      -&gt; where
      -&gt; type_id = 'simple'
      -&gt; and stock_id = 1
      -&gt; INTO OUTFILE '/var/lib/mysql-files/orders.csv'
      -&gt; FIELDS TERMINATED BY ','
      -&gt; ENCLOSED BY '&quot;'
      -&gt; LINES TERMINATED BY '\n';
  </code></pre>
  <p>i keep getting this back
  ERROR 1045 (28000): Access denied for user 'myuser'@'%' (using password: YES)</p>
  <p>can anyone show me what im doing wrong here ?</p>