title: MySQL Load Data Local Infile - Path as User Variable
body: <p>I would like to include a user variable in the MySQL `LOAD DATA LOCAL INFILE' file path. Our small team often accesses raw data files from Dropbox, so everyone has to find/replace the user name in the path definitions. </p>
  
  <p>I was expecting the following to work but keep getting syntax errors:</p>
  
  <pre><code>SET @USER := 'user';
  SET sql_mode='PIPES_AS_CONCAT';
  LOAD DATA LOCAL 
  INFILE '/Users/' || @USER || '/Dropbox/Data/data.csv'
  </code></pre>
  
  <p>Also fails with <code>CONCAT()</code>. Any ideas? Thanks!</p>
  
  <p>Similar questions asked here: <a href="https://stackoverflow.com/questions/14523816/load-data-infile-variable-into-infile-error?rq=1">Load data Infile @variable into infile error</a> but without accepted answer.</p>