in reply to loading csv files into MySQL databse

Good people. Thank you very much for all your brilliant sugestions.I will onpass this to my young friend who is still to experiment with the various suggestions that came. Today we buried one of our activists who was murdered by the zanupf thugs for merely not voting for mugabe. Please bear with us as we might ask some simple questions the challenge is to upload 5.9 million voters on this intented voters roll and then have it hosted on the internet. The oppressed struggling people of zimbabwe and many of the extended families that have been displaced into various countries all long for cahnge and see an end to this brutal evil regime . Last night we downloaded the XL2MySQL converter and we still trying to see how we can resolve the errors. thank you good people God bless. valentine sinemani
  • Comment on Re: loading csv files into MySQL databse

Replies are listed 'Best First'.
Re^2: loading csv files into MySQL databse
by casghost (Initiate) on May 18, 2008 at 00:25 UTC
    In the unlikely event that you continue to have trouble with this problem I would note that it may be possible to have trusted people outside your country work on it and send back the results in formats that should be relatively easy to load into MySQL. MySQL has backup facilities, including a program called mysqldump, that dump records from a table or database in text formats that should load fairly reliably. Some formats are included below. Be aware that different countries may have different date, time and currency formats which are controlled by MySQL locale variables.

    Of course I would expect that there would be concerns about the trustworthiness of those doing the imports and forwarding them in such a case. Other than the issue of trust, I would be happy to help as, I think, would others.

    My expertise in this kind of approach is somewhat limited and I welcome commentary on this suggestion.


    Some sample mysqldump formats:
    (As recommended by another poster, data has been cleansed to attempt to mask voter identities)


    INSERT INTO `voters` VALUES ('GXXX','MELANIE','XXX','F','1982-05-22',22,5,1982,'XX- XXXXXXX XX','202 XXXXXXXXXX XXXX COURT HARARE','640463','7','MT PLEASANT');
    INSERT INTO `voters` VALUES ('O\'GXXX','MELANIE','XXX','F','1982-05-22',22,5,1982,'XX- XXXXXXX XX','19 XXXXX STRATHAVEN HARARE','640463','7','MT PLEASANT');
    INSERT INTO `voters` VALUES ('WXXXXX','HOPE','','F','1985-07-23',23,7,1985,'XX- XXXXXXX XX','17 XXXXXXX DR STRATHAVEN HARARE','640463','7','MT PLEASANT');
    INSERT INTO `voters` VALUES ('MXXXXXXXXXX','KEVIN','XXXXXXXX','M','1981-11-18',18,11,1981,'XX- XXXXXXX XX','24A XXXXXXXXXX XXXX AVONDALE HARARE','640463','7','MT PLEASANT');
    INSERT INTO `voters` VALUES ('DXXXX','NELSON','','M','1986-03-30',30,3,1986,'XX- XXXXXXX XX','10A XXXXXXXXXXXXX ROAD STRATHAVEN HARARE','640463','7','MT PLEASANT');
    INSERT INTO `voters` VALUES ('LXXXXXXXX','TAARIQ','','M','1987-08-14',14,8,1987,'XX- XXXXXXX XX','24A XXXXXXXXXX XXXX AVONDALE HARARE','640463','7','MT PLEASANT');
    INSERT INTO `voters` VALUES ('RXXXXXX','SUVRO','XXXX','M','1988-07-22',22,7,1988,'XX- XXXXXXX XX','18 XXXXXXXX AVE STRATHAVEN HARARE','640463','7','MT PLEASANT');


    INSERT INTO `voters` VALUES ('GXXX','MELANIE','XXX','F','1982-05-22',22,5,1982,'XX- XXXXXXX XX','202 XXXXXXXXXX XXXX COURT HARARE','640463','7','MT PLEASANT'),('O\'GXXX','MELANIE','XXX','F','1982-05-22',22,5,1982,'XX- XXXXXXX XX','19 XXXXX STRATHAVEN HARARE','640463','7','MT PLEASANT'),('WXXXXX','HOPE','','F','1985-07-23',23,7,1985,'XX- XXXXXXX XX','17 XXXXXXX DR STRATHAVEN HARARE','640463','7','MT PLEASANT'),('MXXXXXXXXXX','KEVIN','XXXXXXXX','M','1981-11-18',18,11,1981,'XX- XXXXXXX XX','24A XXXXXXXXXX XXXX AVONDALE HARARE','640463','7','MT PLEASANT'),('DXXXX','NELSON','','M','1986-03-30',30,3,1986,'XX- XXXXXXX XX','10A XXXXXXXXXXXXX ROAD STRATHAVEN HARARE','640463','7','MT PLEASANT'),('LXXXXXXXX','TAARIQ','','M','1987-08-14',14,8,1987,'XX- XXXXXXX XX','24A XXXXXXXXXX XXXX AVONDALE HARARE','640463','7','MT PLEASANT'),('RXXXXXX','SUVRO','XXXX','M','1988-07-22',22,7,1988,'XX- XXXXXXX XX','18 XXXXXXXX AVE STRATHAVEN HARARE','640463','7','MT PLEASANT');