xgab Posted September 27, 2003 Share Posted September 27, 2003 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! Quote Link to comment Share on other sites More sharing options...
effigy Posted September 27, 2003 Share Posted September 27, 2003 i am only familiar with importing via the LOAD command, or by using a redirect at the command line. have you tried that? i think this is correct: ./mysql databasename < file.sql what kind of errors and warnings do you encounter? Quote Link to comment Share on other sites More sharing options...
shivabharat Posted September 27, 2003 Share Posted September 27, 2003 Have you tried the sqlyog tool www.sqlyog.com 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\' Quote Link to comment Share on other sites More sharing options...
xgab Posted September 27, 2003 Author Share Posted September 27, 2003 I already considered sqlyog, but... unfortunately is not freeware... Quote Link to comment Share on other sites More sharing options...
Blu_Smurf Posted September 27, 2003 Share Posted September 27, 2003 they have several gui\'s for sql on mysql.com... try one of them Quote Link to comment Share on other sites More sharing options...
pauper_i Posted September 27, 2003 Share Posted September 27, 2003 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 Quote Link to comment Share on other sites More sharing options...
xgab Posted September 30, 2003 Author Share Posted September 30, 2003 I have found a freeware version of SQLyog ! The current published on-line version 3.2 is paid... but version 3.1 is still freeware! Thank you all! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.