0
votes

I am trying to load a CSV file into a database table.. I absolutely am 100% sure this file path is correct and I have verified it one hundred times. Despite this, when I run this sql query, it tells me the file path is wrong.

Is the file path it is requesting special in any case? I assume to use my root pathing..

LOAD DATA LOCAL INFILE '/var/www/html/wordpress/cron/members.csv' INTO TABLE members_copy FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';

1
Perhaps the path is correct on your local computer but MySQL is running remotely. Or, the MySQL server simply doesn't have access to the file path. - Gordon Linoff
I Know The MYSQL Server is running on the same server. - SlowPoke
Where is the client you're running this command from because that's where the file will be read from since you specified LOCAL. - getbuckts
Please provide the exact error message. - Michael - sqlbot

1 Answers

0
votes

I'm thinking a perms issue. check your perms on every directory from root to file...making sure you have executable rights in all directories (/var, /var/www, /var/www/html, etc ). I'm assuming the file itself is at least 644.