Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mysqlimport reports Error: 29, File '/tmp/newTable.txt' not found (Errcode: 13), when using table: newTable

Tags:

mysql

ubuntu

For a while not I have been trying to import a tab separated text file into my mysql database. I keep getting this error.

A few forums advised that I should change the mode of the file and folder to 777. Which I did, but still the same error.

Error: 29, File '/tmp/vehicleMake.txt' not found (Errcode: 13), when using table: vehicleMake
like image 987
Siddharth Avatar asked Jun 04 '12 14:06

Siddharth


People also ask

Why am I getting error messages when using mysqlimport from the command line?

The first error you might experience when using mysqlimport from the command line is shown below. In this example we have entered either the username or password incorrectly. The error text shows us we did enter the password (it would say "Using password: NO" if we had not) but does not tell us whether it was the username or password.

How to import data from files to tables in MySQL?

The Standard MySQLImport command seamlessly imports data from the files you mention to your tables. By naming the files exactly the same as the Table name, you can avoid any errors and effortlessly import data to your tables. MySQLImport command also provides a list of options to enter columns list, compression settings, passwords, etc.

Why is my database import file not working?

Database Import File Does Not Exist This error means the file you are trying to import into MySQL does not exist. Check you have the path correct and the file actually exists. It can also mean that the MySQL server does not have sufficient permissions to access the file in the directory it is in.

What is the MySQL connection id for 257 server version?

Your MySQL connection id is 257 Server version: 5.5.29-0ubuntu0.12.04.1-log (Ubuntu) Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.


2 Answers

Sorry for trouble, I used --local option and it worked.. Magic!!!

like image 96
Siddharth Avatar answered Oct 05 '22 03:10

Siddharth


The LOCAL option is no longer supported in most versions of MYSQL. In Ubuntu 14.04 and MYSQL 5.5 I moved the file to the /tmp directory and changed ownership of the file to mysql using the following in the shell:

sudo chown mysql.mysql <filename>
like image 20
y-i_guy Avatar answered Oct 05 '22 04:10

y-i_guy