I'm trying:
mysql>
LOAD DATA LOCAL INFILE '/var/tmp/countries.csv'
INTO TABLE countries
FIELDS TERMINATED BY ','
ENCLOSED BY '"' LINES
TERMINATED BY '\n'
IGNORE 1 LINES
(CountryId,CountryCode,CountryDescription,CountryRegion,LastUpdatedDate,created_by,created_on)
SET created_by = 'DH_INITIAL_LOAD', created_on = current_timestamp();
ERROR 2068 (HY000): LOAD DATA LOCAL INFILE file request rejected due to restrictions on access.`
It was working fine, I downloaded pymysql and mysql connector for the python script. I uninstalled and checked still it is not working. The verion and infile is ON,
select version() -| 8.0.17
mysql> SHOW GLOBAL VARIABLES LIKE 'local_infile';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| local_infile | ON |
+---------------+-------+
1 row in set (0.00 sec)
LOCAL
keyword - it is errorneous in your case. Then check: 1) Access rights (in the filesystem) for OS account which is used for MySQL daemon starting 2)local_infile
system variable (done - ON is correct value) 3)secure_file_priv
system variable 4) FILE privilege for MySQL account which is used for the query executing.