title: Mysql server showing secure-file-priv error message even though secure-file-priv is set
body: <p>I am running mysql version 5.7.27 for Linux on a remote server.
  I have a php Script that should load some big csv files into a database via following code
  <code>
      $query = "LOAD DATA INFILE 
      'C:/some/big/file/file.csv'
      REPLACE INTO TABLE csv_table
      CHARACTER SET UTF8
      FIELDS TERMINATED BY ','
      OPTIONALLY ENCLOSED BY '\"'
      LINES TERMINATED BY '\r\n'
      IGNORE 1 LINES";
  </code></p>
  
  <p>The script is running normally but mysql sends out the following error:</p>
  
  <p>Errormessage: The MySQL server is running with the --secure-file-priv option so it cannot execute this statement</p>
  
  <p>I already did a lot of googling about this error and eventually found some helpful tips about how to set the variable and what to set:
  <a href="https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_secure_file_priv" rel="nofollow noreferrer">https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_secure_file_priv</a>
  I also learned mysql will look at 3 places for the configuration:</p>
  
  <p>/etc/my.cnf</p>
  
  <p>/etc/mysql/my.cnf</p>
  
  <p>/usr/local/etc/my.cnf ~/.my.cnf</p>
  
  <p>in respective order. </p>
  
  <p>The my.cnf includes etc/mysql/mysql.conf.d file so I put the following line there
  <code>[mysqld]
  secure_file_priv = '/home/my/folder/'
  </code></p>
  
  <p>When I check the setting via 
  <code>SHOW VARIABLES LIKE 'secure-f%';</code>
  I get the correct value! 
  But when I try to execute the script, I still receive the same old error message. Since the setting is correctly printed, I am not sure what to make of this.
  Please help me figure out how to get rid of this error. Thanks</p>
  
  <p>EDIT:</p>
  
  <p>Thanks for the hint! It's embarassing but it was really like you said. I tested locally (worked) and copy pasted the code onto the server, where there is no C:/ .. of course. Thank you.
  After this I got a different error which could be solved with the help of this:
  <a href="https://stackoverflow.com/questions/4215231/load-data-infile-error-code-13">LOAD DATA INFILE Error Code : 13</a></p>