Results 1 to 2 of 2

Thread: mysqlimport

  1. #1
    Join Date
    Jan 2003
    Posts
    2

    Unanswered: mysqlimport

    Hello,

    I am importing a huge text file (~35 mb) into a table in a database.
    mysqlimport tells me the following:

    Connecting to localhost
    Selecting database magnesium
    Loading data from LOCAL file: demographics.txt into demographics
    magnesium.demographics: Records: 147597 Deleted: 0 Skipped: 0 Warnings: 15
    Disconnecting from localhost

    Is there any way to find out where does warning occur? Does mysqlimport maintains a log file? Thanks in advance.

    Alexander

    P.S.: I am running a Win32 mySQL

  2. #2
    Join Date
    Aug 2001
    Location
    London, UK
    Posts
    31
    Check the documentation for mysqlimport at http://www.mysql.com/doc/en/mysqlimport.html

    There are numerous switches that may be applicable
    -#, --debug[=option_string]
    -v, --verbose
    Verbose mode. Print out more information what the program does.
    Those two may be the most applicable.

    Most warnings will occur for rows where you attempt to insert null values into columns defined as not null... or where the data for a column exceeds the length of the datatype defined for that column... and finally for incorrect datatypes (e.g. string into date column).

    One idea is to dump the table into a text file of precisely the same format and then perform a diff (http://www.textpad.com/ is a good win32 tool for large diffs) to determine the rows that have errors. Most likely you'll find a few columns were truncated because of insufficent;y size datatypes for the values you were inserting.

    hehe...

    Ignore that crap... just looked through the MySql documentation some more... and it seems that this page has the answer for you: http://www.mysql.com/doc/en/SHOW_WARNINGS.html

    Cheers

    David K
    My homepage:
    http://www.buro9.com/
    My work:
    http://www.btopenworld.com/
    http://www.officialfootballsites.co.uk/
    http://www.jeepster.co.uk/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •