stan4osu Posted December 21, 2006 Share Posted December 21, 2006 Total newbie to MySQL here - although I have worked with other databases. ---I created a small db in excel and I just want to import it into MySQL. the MySQL app is at my hosting site (godaddy.com) and it appears the only option is to import a text file (but there is no other documentation than that). I have exported my data out of excel to a text file and attempted to import it several times and it won't take it.I even created a simple 2 field db of VARCHAR fields and tried to load one record and I couldn't.Can someone please help me with this (apparently) simple task. I sure don't want to data entry all this data.Thanks in advance!! Link to comment https://forums.phpfreaks.com/topic/31522-importing-data-into-mysql/ Share on other sites More sharing options...
makeshift_theory Posted December 21, 2006 Share Posted December 21, 2006 So your wanting to take your excel db and dump it into mysql correct? Link to comment https://forums.phpfreaks.com/topic/31522-importing-data-into-mysql/#findComment-146008 Share on other sites More sharing options...
stan4osu Posted December 21, 2006 Author Share Posted December 21, 2006 Correct. :) Link to comment https://forums.phpfreaks.com/topic/31522-importing-data-into-mysql/#findComment-146011 Share on other sites More sharing options...
makeshift_theory Posted December 21, 2006 Share Posted December 21, 2006 Well you can issue this sql command to do it manually:[code]LOAD DATA INFILE '/tmp/filename.csv' replace INTO TABLE [table name] FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' (field1,field2,field3);[/code]Do you have access to phpmyadmin on your host? Link to comment https://forums.phpfreaks.com/topic/31522-importing-data-into-mysql/#findComment-146012 Share on other sites More sharing options...
stan4osu Posted December 21, 2006 Author Share Posted December 21, 2006 Yes, I think I can use SQL commands. Link to comment https://forums.phpfreaks.com/topic/31522-importing-data-into-mysql/#findComment-146013 Share on other sites More sharing options...
stan4osu Posted December 21, 2006 Author Share Posted December 21, 2006 Any special treatment for "DATE" fields? Link to comment https://forums.phpfreaks.com/topic/31522-importing-data-into-mysql/#findComment-146015 Share on other sites More sharing options...
makeshift_theory Posted December 21, 2006 Share Posted December 21, 2006 Not that I know of, try to run the command and post results. Link to comment https://forums.phpfreaks.com/topic/31522-importing-data-into-mysql/#findComment-146043 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.