mysqlimport找不到文件错误


8

我正在按照此页面上的说明建立用于基因注释的本地数据库。他们提供了一个.sql文件来创建一些MySQL表结构(步骤4)以及几个数据文件来填充表(步骤5-7)。我已经完成了第5步的设置过程,但是在第6步遇到了错误。令人不安的是,根据执行mysqlimport命令的目录,我收到的错误有所不同。

standage@farnsworth:~$ mysqlimport -u wendel2go -p --fields-terminated-by='\t' b2g Desktop/gene2accession 
Enter password: 
mysqlimport: Error: 13, Can't get stat of '/var/lib/mysql/Desktop/gene2accession' (Errcode: 2), when using table: gene2accession
standage@farnsworth:~$ cd Desktop/
standage@farnsworth:~/Desktop$ mysqlimport -u wendel2go -p --fields-terminated-by='\t' b2g gene2accession 
Enter password: 
mysqlimport: Error: 29, File '/var/lib/mysql/b2g/gene2accession' not found (Errcode: 2), when using table: gene2accession

谷歌搜索此错误时,我得到的信息不多。有任何想法吗?

Answers:


9

原来,该--local选项是必需的。当我这样发布命令时,该命令起作用了。

mysqlimport -u root -p --fields-terminated-by='\t' --local b2g /home/standage/Desktop/gene2accession
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.