PHP Joomla 2.5 MySQL Load Data Infile - Permission denied
This error is usually due to you not including the LOCAL keyword. Try:
LOAD DATA LOCAL INFILE '//homeX/username/public_html/activator/uploadedCSV/20180603064917_csvtoimport.csv'
INTO TABLE `csv_import_temp`
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\'
LINES TERMINATED BY ''
IGNORE 1 ROWS
The permission error is misleading, it relates to trying to the mysql system directories rather than the file you are trying to read.
Mysql permission errors with 'load data'
Here's a thread on the MySQL forums that discusses exactly this.
Here's the answer, posted by Ken Tassell
Problem resolved using the command below:
grant file on *.* to kentest@localhost identified by 'kentest1';
ERROR 2068 (HY000): LOAD DATA LOCAL INFILE file request rejected due to restrictions on access
Known issue: https://bugs.mysql.com/bug.php?id=91872
for workaround when trying to connect to mysql in itself set local-infile to 1 and perform the load command:
mysql --local-infile=1 -h$MASTER_DB_HOST -u$MASTER_DB_USER -p$MASTER_DB_PASSWD -D$MASTER_DB_NAME