1

I am trying to import English wikipedia dump into MySQL so I can use the JWPL library to work with it.

I installed MySSQ, created a database named wikidump, ran a sql script that created the needed tables, and tried to run the following import command to load the data:

mysqlimport -u root-p --local --default-character-set=utf8 wikidump `pwd`/*.txt

When I do so, I get the following error:

msqlimport: Error: 1017,can't find file: '.\wilidump\@002.frm' <errno:22> when using table:*

I ran the command from the root directory of the files to import. Is this okay?

Is this a problem with the db or the the files I am trying to import? Any clues on what to do next?

(Sorry, if it a simple question and I'm just missing out on something simple, I am a newbie to sql and I did my best searching for an answer.)

Mat
  • 202,337
  • 40
  • 393
  • 406
Roi Ronn
  • 55
  • 1
  • 8

2 Answers2

1

I got this message once when I tried to read in gzipped data files and needed to uncompress them first...

felix
  • 11
  • 1
1

I got the problem too. It seems that the command didn't support the usage of "*". So my way to solve the problem is to list all the names of the files into another file, use the shell to add "mysqlimport ......" before every file name, the use the file as a script to repeat the import command to all the files.

huwenchao
  • 44
  • 3
  • 1
    If that works it's usually easier to write a shell loop to do it, like for filename in `pwd`/*.txt; do mysqlimport --whatever $filename; done – FoolishSeth Oct 27 '12 at 08:45