Issues with MySQL [SOLVED]

I’m trying to import the data from the file, “data.csv” to my MySQL database.
LOAD DATA INFILE './data.csv' IGNORE INTO TABLE puzzles FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n';

But I receive this error,
ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

I looked through some solutions on how to resolve this issue such as setting the secure-file-priv to “” but I cant seem to make it work, I also can’t access the directory /var/lib/mysql-files/

SOLVED: Adding LOCAL to the command allows it to work: LOAD DATA LOCAL INFILE './data.csv' IGNORE INTO TABLE puzzles FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n';

1 Like

Resolved, look at the initial post for the solution.

3 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.