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!! Quote Link to comment 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? Quote Link to comment Share on other sites More sharing options...
stan4osu Posted December 21, 2006 Author Share Posted December 21, 2006 Correct. :) Quote Link to comment 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? Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
stan4osu Posted December 21, 2006 Author Share Posted December 21, 2006 Any special treatment for "DATE" fields? Quote Link to comment 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. 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.