简体   繁体   中英

Loading CSV File into MySQL returns error

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';

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM