Solved

mysqlimport error

Posted on 2010-11-16
2
422 Views
Last Modified: 2012-05-10
Hi

I was wondering why i am getting the following error:

C:\>mysqlimport -u root -pxxx test_import C:\employee.txt
mysqlimport: Error: Data truncated for column 'empno' at row 1, when using table
: employee

but everything works ok if i add the --local flag. I don't remember ever having to use this flag before
C:\>mysqlimport -u root -paxxx test_import --local C:\employee.txt
test_import.employee: Records: 3  Deleted: 0  Skipped: 0  Warnings: 9


thanks
0
Comment
Question by:andieje
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
xeonol earned 500 total points
ID: 34153156
The --local flag specifies that the tool reads the data file locally and then send it to server instead of letting server read the file directly.

I guess if your mysqlimport tool and mysql server are mismatched, so that the tool can recongize the format while the server side cannot.
0
 

Author Closing Comment

by:andieje
ID: 34154623
ok, that makes sense, thanks
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question