简体   繁体   English

mysql workbench加载数据本地infile找不到文件或目录

[英]mysql workbench load data local infile cannot find file or directory

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. 几个星期以来,Mysql Workbench已经出错了,但我甚至找不到该文件。 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! 它是我指定的文件夹中的def!

Keep in mind that i already played with the slashes, forward, backward, double forward, double backward, etc... 请记住,我已经玩过斜线,前进,后退,双前进,双后退等等......

Windows path names are specified using forward slashes rather than backslashes. Windows路径名使用正斜杠而不是反斜杠指定。 If you do use backslashes, you must double them. 如果使用反斜杠,则必须将它们加倍。

See http://dev.mysql.com/doc/refman/5.1/en/load-data.html 请参阅http://dev.mysql.com/doc/refman/5.1/en/load-data.html

我有同样的问题你的路径应该使用“”

"C:\\PRODUCT_GROUP_UPLOAD.CSV" if running from workbench

LOAD DATA LOCAL requires the file to be on the client machine. LOAD DATA LOCAL要求文件位于客户端计算机上。 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 ). 我这样写是因为可以关闭LOCAL支持(另请参阅http://dev.mysql.com/doc/refman/5.6/en/load-data-local.html )。

Mike 麦克风

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. Windows可能会限制对该区域的访问。 Then test your LOAD INFILE statement again. 然后再次测试您的LOAD INFILE语句。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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