Jump to content

Cannot import into MySQL


xgab

Recommended Posts

Hi!

This is my first experience importing comma, pipe or tabs delimited plain files into a MySQL Database.

 

I tried using more than one tool and none of them worked...

 

The thing is that one of the plain files has 250,000 records.

 

- I tried with a nice freeware script called CSV Importer. It enabled me to import succesfully one plain file of 6,000 records, but the second one has 24,000 and it uploaded only 8,000 (so the largest one will be imposible). Does anyone ever used CSV Importer ? (downloaded from hotscripts.com)

 

- Then I tried with the latest PHPMyAdmin system. It is very clear how to export information, but I could not figured out how to import!. There is an import link at the little SQL window that asks me for a txt file, but it is not clear how to format and process it.

 

- I also tried with a Windows freeware to create the .sql file from Access. It created a huge file with many INSERTs. How should I process that big file, thru the little PHPmyAdmin SQL window ???

 

- Finally I tried with LOAD FROM and mysqlimport, but... unfortunately I get many errors and warnings and the help information at the mysql site is not enough for me... I a newbie :-(

 

Which is the best option or technique to import large amounts of records ?

 

The server I use is Linux Mandrake with PHP 4.3.3, the latest MySQL and also my PC is Windows XP.

 

I will apreciate you help. Than you!

Link to comment
Share on other sites

Go with the big \'inserts\' file and the little SQL window!

It isn\'t the size of the file, its the length of the inserts statement that matters - if it will handle one, you can batch process the rest.

 

Better yet, write a php script to handle it all. Whichever way you choose, its going to be time consuming importing it all, in terms of machine cycles. Might as well bite the bullet and kick it off, it may well be done before you can find a faster method, and I\'m assuming that this is something you\'ll only have to do the once!

 

Oh yes, and check your backup policies too, make SURE you only have to do it once! *grin*

 

Good luck with it!

 

D

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.