How To Solve the LOAD DATA INFILE Error from –secure-file-priv

Author: , June 12th, 2019

The Problem Tried to load a Tab-delimited text file into MuSQL 5.6.43 and got the following error: mysql> LOAD DATA INFILE ‘sample.txt’ INTO TABLE test_table; ERROR 1290 (HY000): The MySQL server is running with the –secure-file-priv option so it cannot execute this statement Solution One mysql> SHOW VARIABLES LIKE “secure_file_priv”; Copy the file into the […]

How To Load Data Into MySQL From a Server-Based CSV File

Author: , December 5th, 2010

LOAD DATA INFILE ‘/full/path/to/file.csv’ INTO TABLE labor FIELDS TERMINATED BY ‘,’ LINES TERMINATED BY ‘\n’ IGNORE 1 LINES;