如何修复 mysql 中的 ERROR 29 (HY000)?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5515450/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to fix ERROR 29 (HY000) in mysql?
提问by Bhuvan raj
When I use this command below in Mysql client 5.1 in ubuntu:
当我在 ubuntu 的 Mysql 客户端 5.1 中使用以下命令时:
load data infile 'words.csv' into table words;
I'm getting this error:
我收到此错误:
ERROR 29 (HY000): File '/var/lib/mysql/bhuvan/words.csv' not found (Errcode: 2)
Help me out.
帮帮我。
回答by k to the z
Try
尝试
load data local infile 'words.csv' into table words
fields terminated by ','
enclosed by '"'
lines terminated by '\n';
If your words file is in your / directory.
如果您的 words 文件在您的 / 目录中。
回答by Seb
For Ubuntu users,
对于 Ubuntu 用户,
Check you currently use: mysql -u user -p --local-infile.
检查您当前使用:mysql -u user -p --local-infile。
Another useful linktalking about apparmor configuration.
另一个关于 apparmor 配置的有用链接。
回答by Quassnoi
If the file is located on your client machine, you should use this:
如果该文件位于您的客户端计算机上,则应使用以下命令:
load data local infile 'words.csv' into table words;