4

When I use this command below in Mysql client 5.1 in ubuntu:

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.

Nishant
  • 54,584
  • 13
  • 112
  • 127
Bhuvan raj
  • 413
  • 3
  • 8
  • 17

3 Answers3

12

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.

k to the z
  • 3,217
  • 2
  • 27
  • 41
7

For Ubuntu users,

Check you currently use: mysql -u user -p --local-infile.

Another useful link talking about apparmor configuration.

Community
  • 1
  • 1
Seb
  • 111
  • 1
  • 4
2

If the file is located on your client machine, you should use this:

load data local infile 'words.csv' into table words;
Quassnoi
  • 413,100
  • 91
  • 616
  • 614