Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm setting up a local database for gene annotation following the instructions on this page. They provide an .sql file to create some MySQL table structures (step 4) and several data files to populate the tables (steps 5-7). I've completed the setup process through step 5, but I am getting errors at step 6. What's unnerving is that the error I'm getting is different based on which directory I execute the mysqlimport command from.

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

I'm not getting very informative results when I'm googling this error. Any ideas?

Update: I still get an error when I use the full path of the file, but the file not found is different now.

standage@farnsworth:~$ mysqlimport -u root -p --fields-terminated-by='\t' b2g /home/standage/Desktop/gene2accession 
Enter password: 
mysqlimport: Error: 29, File '/home/standage/Desktop/gene2accession' not found (Errcode: 13), when using table: gene2accession
standage@farnsworth:~$ list /home/standage/Desktop/gene2accession 
-rw-r--r-- 1 standage standage 1.6G 2010-12-01 14:31 /home/standage/Desktop/gene2accession

The file exists, and it's not a permissions issue.

share|improve this question
    
BTW, I'm running Ubuntu 10.04 32 bit. –  Daniel Standage Dec 2 '10 at 14:43

1 Answer 1

up vote 2 down vote accepted

Try the full path to the file:

mysqlimport -u wendel2go -p --fields-terminated-by='\t' b2g /home/username/Desktop/gene2accession

Replace "username" with your user name.

share|improve this answer
    
I get the Error: 29 again when I use the full path. –  Daniel Standage Dec 2 '10 at 17:36
1  
@Daniel: Three things to try: Add --local to your mysqlimport command. If that doesn't work, try chgrp mysql ~/Desktop/gene2accession; chmod g+r ~/Desktop/gene2accession and try your command again. If that doesn't work, try moving the file from Desktop to /var/lib/mysql and use ./gene2accession or gene2accession as your last argument. –  Dennis Williamson Dec 2 '10 at 18:00
1  
Using the --local option worked. Thanks! –  Daniel Standage Dec 2 '10 at 18:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.