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'
IGNORE
INTO TABLE `csv_import_temp`
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\'
LINES TERMINATED BY ''
IGNORE 1 ROWS
(
contact_email,
contact_email
);
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
Related Topics
Mysql Split Comma Separated String into Temp Table
How to Sum Up Time Field in SQL Server
Find Records from One Table Which Don't Exist in Another
Inserting Date Value into Date Field Using Laravel
Query to Get All Those Names of Employees,Who Have 'A' as Their Middle Character in Their Name
Query to Calculate Average of Employee Salaries Working Under Manager in SQL
T-Sql Challenges from Hackerrank
Joining the Table Conditionally in SQL
Sql - How to Sum/Aggregate Certain Rows in a Table
SQL Server Dynamic PIVOT Query
Sql Select Count for Multiple Columns in a Single Query
How to Update Millions of Records in MySQL
How to Check If Value Is Inserted Successfully or Not
How to Count Number of Digits After a Decimal Place
Constraint for Phone Number in SQL Server
How to Import CSV Data into a Table Without Knowing the Columns of the Csv
How to Enforce Case Sensitive Table and Column Names in MySQL