尝试将数据导入 mySql 时找不到 frm 文件
我正在尝试将英语维基百科转储导入 MySQL,以便我可以使用 JWPL 库来使用它。
我安装了 MySSQ,创建了一个名为 wikidump 的数据库,运行了一个创建所需表的 sql 脚本,并尝试运行以下导入命令来加载数据:
mysqlimport -u root-p --local --default-character-set=utf8 wikidump `pwd`/*.txt
当我这样做时,我收到以下错误:
msqlimport: Error: 1017,can't find file: '.\wilidump\@002.frm' <errno:22> when using table:*
我从要导入的文件的根目录。这样可以吗?
这是数据库或我尝试导入的文件的问题吗? 有关下一步该做什么的任何线索吗?
(抱歉,如果这是一个简单的问题,而我只是错过了一些简单的事情,我是 sql 的新手,我尽了最大努力寻找答案。)
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.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当我尝试读取 gzip 压缩的数据文件并需要先解压缩它们时,我收到此消息...
I got this message once when I tried to read in gzipped data files and needed to uncompress them first...
我也遇到了问题。
该命令似乎不支持使用“*”。所以我解决问题的方法就是把所有文件名列出到另一个文件中,使用shell在每个文件名前添加“mysqlimport ......”,使用该文件作为脚本重复导入命令到所有文件。
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.