I'm new to MySQL and trying (for hours) to import a csv file. The phpMyAdmin-import settings are as follows: -csv -fields terminated by ; fileds enclosed by " fields escaped by \ lines terminated by auto column names [left empty] The first line loads fine, the 2nd and 3rd do not, I have tried putting the first and second into the first position, but it still gets and error for that line: Line 1 (works): 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 Line 2 (not working, error) 1,xxxxxxx2,xxxxxxxx3,xxxxxxxxxxxxxxxxxxx4,5,xxxxx6,xx7,xxxx8,xxxxxxxxxx9,xxxxxxxxxxxxx10,xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx11,xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx12,xxxxxxx13,14,x15,x16,x17,x18,xxx19,20 Line 3 (not working, error, this was the original error) 1,Biodiesel,somestore,35 Highway 75 South,_,Townn,AL,33376,205-444-444,Public - see hours,6:30am-9pm M-F 7am-8pm Sat 10am-6pm Sun,Cash AmericanExpress Discover MasterCard VISA Voyager WrightExpress,6/30/2007,_ ,_ ,_ ,_ ,_ ,bg_lat,bg_long I did a nearly identical project yesterday, and it worked fine. Edit: I just got an identical file to work, except it is tab delimited instead of commas. Although no longer 'urgent', the above question is still a very curious thing that i would like to know. Line 1 worked in that first test, but line 2 did not.
gibex, I'm using varchar except for the first column which is the key; for the key I'm using integer.
I actually had this problems a few months ago and wrote about what solved it for me here: andrewodendaal.com/phpmyadmin-invalid-field-count-in-csv-input-on-line-1/
+1 import data into mysql via the GUI is very simple, open the Import Wizard and specify the file import and other parameters. To import the data I use dbForge. the lack of GUI that there is no import data via the command line.