For the past 2 days, I have been trying to load data from a CSV file into a mySQL database. At first, I encountered the secure file priv error, which didn't go away when I changed my file location, or when I commented out the relevant line in "my.ini". When I eventually resolved that by changing its value to an empty string, I discovered that I still couldn't load the file as I was getting OS errno2 no such file or directory
.
LOAD DATA INFILE "C:/Users/ehize/Downloads/not414.csv"
INTO TABLE birthrate
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 ROWS;
I don't know if this makes any difference, but I'm hosting this mysql server on my system. I have also tried the LOAD DATA LOCAL
, but it makes no difference as \I get the same file not found error. Honestly at my wits end here. Everyone online just talks about changing backslashes to front-slashes or double back-slashes, none of which make any difference. Please help of any form would be appreciated.