title: MySQL LOAD DATA LOCAL INFILE to a remote server
body: <p>I want to import a csv file from my local computer to a mysql server on a remote machine using <code>LOAD DATA LOCAL INFILE</code>. When I try this without <code>LOCAL</code> and my file is stored at the remote computer it works (file and mysql on the same server), but is not working when the mysql server is on a remote computer.</p>
  
  <pre><code>LOAD DATA LOCAL INFILE 'C:/wamp/www/accesos/uploaded_files/wawawa.csv'
  INTO TABLE eventos
  FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
  LINES TERMINATED BY '\n'
  (@skip,@skip,@skip,@skip,@skip,@skip,@skip,@skip,@skip,nombre,@skip,num_servo,@fecha,hora,@skip,num_tarjeta,@archivo_procedencia)
  set archivo_procedencia = 'test_file', fecha = STR_TO_DATE(@fecha, '%d/%m/%Y');
  </code></pre>
  
  <p>So, what I'm doing from my computer: I'm connecting to phpmyadmin on the remote computer.
  Executing the above code but is not working. But it works if I remove <code>"LOCAL"</code> and move my file to the remote computer and change the path to match the file path.</p>
  
  <p>The error is:</p>
  
  <p>Can't find file 'C:/wamp/www/accesos/uploaded_files/wawawa.csv'. </p>
  
  <p>Any ideas on how to do this?</p>