?
Solved

mysqlimport error

Posted on 2010-11-16
2
Medium Priority
?
437 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
2 Comments
 
LVL 3

Accepted Solution

by:
xeonol earned 2000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month15 days, 10 hours left to enroll

850 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