List:General Discussion« Previous MessageNext Message »
From:Jerry Schwartz Date:January 3 2011 8:35pm
Subject:RE: mysqlimport doesn't work for me
View as plain text  
>-----Original Message-----
>From: Carsten Pedersen [mailto:carsten@stripped]
>Sent: Monday, January 03, 2011 1:48 PM
>To: Jerry Schwartz
>Cc: 'mos'; mysql@stripped
>Subject: Re: mysqlimport doesn't work for me
>
>It's been a long time sine I used mysqlimport, but you might want to try:
>
>- using "--fields-terminated-by" rather than "--fields-terminated"


[JS] Good catch! Unfortunately, it didn't fix the problem:

Connecting to localhost
Selecting database maintable_usa
Deleting the old data from table t_dmu_history
Loading data from LOCAL file: C:/Users/Jerry/Documents/Access_MySQL 
Tests/t_dmu_history.txt into t_dmu_history
maintable_usa.t_dmu_history: Records: 1  Deleted: 0  Skipped: 0  Warnings: 2
Disconnecting from localhost

I don't know if there's any way to find out what those warnings are.


>- losing (or escaping) the backticks in --columns=
>
[JS] The loons who designed this system were fond of putting spaces in the 
table names. I've tried this particular table with and without the back-ticks.

Many of the table and field names are in Japanese, too. I shudder to think how 
that will work out.

>- checking my.cnf to see if the client settings are the same for mysql>
>and mysqlimport


[JS] Good thought.

>- checking user privileges (are you using the same account in both
>instances?)


[JS] Yes.

>- checking the line delimiter and --lines-terminated-by
>
>FWIW, I always prefer tab-delimited files over comma-separated ones.
>This gets around a lot of i18n issues.
>
[JS] No doubt.

>/ Carsten
>
>Den 03-01-2011 19:33, Jerry Schwartz skrev:
>> <sigh>
>>
>> This works:
>>
>> localhost>TRUNCATE t_dmu_history;
>> Query OK, 0 rows affected (0.41 sec)
>>
>> localhost>LOAD DATA LOCAL INFILE 't_dmu_history.txt' INTO TABLE 
>> t_dmu_history
>> FIELDS TERMINATED BY "," (`dm_history_dm_id`,`dm_history_customer_id`);
>>
>> Query OK, 876211 rows affected (25.16 sec)
>> Records: 876211  Deleted: 0  Skipped: 0  Warnings: 0
>>
>> localhost>SELECT * FROM t_dmu_history LIMIT 4;
>> +------------------+------------------+------------------------+
>> | t_dmu_history_id | DM_History_DM_ID | DM_History_Customer_ID |
>> +------------------+------------------+------------------------+
>> |                1 |            13071 |                 299519 |
>> |                2 |            13071 |                 299520 |
>> |                3 |            13071 |                 299521 |
>> |                4 |            13071 |                 299522 |
>> +------------------+------------------+------------------------+
>> 4 rows in set (0.03 sec)
>> ============================
>> This does not work:
>>
>> localhost>TRUNCATE t_dmu_history;
>> localhost>quit
>>
>> C:\Users\Jerry\Documents\Access MySQL
>> Production>mysqlimport --columns=`dm_history_dm_id`,`dm_history_customer_id`
>--fields-terminated=','
>>   --local --password=xxx --pipe --user=access --verbose maintable_usa
>> t_dmu_history.txt
>> Connecting to localhost
>> Selecting database maintable_usa
>> Loading data from LOCAL file: C:/Users/Jerry/Documents/Access MySQL
>> Production/t_dmu_history.txt into t_dmu_history
>> maintable_usa.t_dmu_history: Records: 876211  Deleted: 0  Skipped: 0
>> Warnings: 1752422
>> Disconnecting from localhost
>>
>> localhost>SELECT * FROM t_dmu_history LIMIT 4;
>> +------------------+------------------+------------------------+
>> | t_dmu_history_id | DM_History_DM_ID | DM_History_Customer_ID |
>> +------------------+------------------+------------------------+
>> |                1 |            13071 |                   NULL |
>> |                2 |            13071 |                   NULL |
>> |                3 |            13071 |                   NULL |
>> |                4 |            13071 |                   NULL |
>> +------------------+------------------+------------------------+
>> 4 rows in set (0.00 sec)
>> =========================
>>
>> Before you ask, the mysql CLI is also using a named pipe.
>>
>> Windows Vista 32-bit
>> MySQL version 5.1.31-community
>> Mysqlimport Ver 3.7 Distrib 5.1.31, for Win32 (ia32)
>>
>> What am I missing?
>>
>> Regards,
>>
>> Jerry Schwartz
>> Global Information Incorporated
>> 195 Farmington Ave.
>> Farmington, CT 06032
>>
>> 860.674.8796 / FAX: 860.674.8341
>> E-mail: jerry@stripped
>> Web site: www.the-infoshop.com
>>
>>
>>
>>
>>



Thread
This just seems to slowJerry Schwartz3 Jan
  • Re: This just seems to slowmos3 Jan
    • RE: This just seems to slowDaevid Vincent3 Jan
      • Re: This just seems to slowWagner Bianchi3 Jan
        • RE: This just seems to slowJerry Schwartz3 Jan
      • RE: This just seems to slowJerry Schwartz3 Jan
        • Re: This just seems to slowMySQL)3 Jan
    • RE: This just seems to slowJerry Schwartz3 Jan
      • RE: This just seems to slowGavin Towey3 Jan
        • RE: This just seems to slowJerry Schwartz3 Jan
      • RE: This just seems to slowmos3 Jan
        • RE: This just seems to slowJerry Schwartz4 Jan
          • RE: This just seems to slowmos4 Jan
            • RE: This just seems to slowJerry Schwartz4 Jan
  • mysqlimport doesn't work for meJerry Schwartz3 Jan
    • Re: mysqlimport doesn't work for meCarsten Pedersen3 Jan
      • RE: mysqlimport doesn't work for meJerry Schwartz3 Jan