Reputation:
Anyone else having problem using:
LOAD DATA LOCAL INFILE 'c:/PRODUCT_GROUP_UPLOAD.CSV' into TABLE ats_store.product_group
FIELDS TERMINATED BY ',' ENCLOSED BY '"'
ESCAPED BY '"' LINES TERMINATED BY '\r\n'
(product_group_id,name,price,description,image,start_time,end_time,start_date,end_date,product_code,delivery_format);
Mysql Workbench has been buggy for a few weeks now, but I can't even find the file. Also, I updated today!
I get:
Error Code: 2. File 'c:\PRODUCT_GROUP_UPLOAD.CSV' not found (Errcode: 2 - No such file or directory)
I have loaded other files, but can't seem to get this one loaded? It's def in the folder I specify!
Keep in mind that i already played with the slashes, forward, backward, double forward, double backward, etc...
Upvotes: 4
Views: 26404
Reputation: 418
I had the same problem your path should be using ""
"C:\\PRODUCT_GROUP_UPLOAD.CSV" if running from workbench
Upvotes: 3
Reputation: 21
Try moving the data file to a test directory not under "documents and settings" or its children. Windows may be restricting access to that area. Then test your LOAD INFILE statement again.
Upvotes: 1
Reputation: 53337
LOAD DATA LOCAL requires the file to be on the client machine. Is this the case for you?
Since you wrote you have already loaded other files I assume your server and client have been the same for all attempts and only this single file fails to load. I write this because LOCAL support can be switched off (see also http://dev.mysql.com/doc/refman/5.6/en/load-data-local.html).
Mike
Upvotes: 1
Reputation: 8885
Windows path names are specified using forward slashes rather than backslashes. If you do use backslashes, you must double them.
See http://dev.mysql.com/doc/refman/5.1/en/load-data.html
Upvotes: 8