Cannot import into MySQL
Posted 27 September 2003 - 01:39 AM
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!
Posted 27 September 2003 - 02:54 AM
./mysql databasename < file.sql
what kind of errors and warnings do you encounter?
Posted 27 September 2003 - 06:42 AM
It helps you in imoprting data easily GUI based
This is the command to import csv file
LOAD DATA INFILE <Filename with path> INTO TABLE <table_name> FIELDS TERMINATED BY \',\' LINES TERMINATED BY \'n\'
Posted 27 September 2003 - 02:45 PM
Posted 27 September 2003 - 03:30 PM
Posted 27 September 2003 - 03:33 PM
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!
Posted 30 September 2003 - 03:02 PM
The current published on-line version 3.2 is paid... but version 3.1 is still freeware!
Thank you all!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users