How To Fix “Invalid field count in csv input on line 1″ phpMyAdmin Error

How To Fix "Invalid field count in csv input on line 1" phpMyAdmin Error

I knew phpMyAdmin had a function that allowed the import of CSV files, so I saved my data in CSV format using Excel 07, but when I tried importing it into my MySQL table using phpMyAdmin, it kept giving me this error: “Invalid field count in csv input on line 1″

This was very annoying, and because of the sheer number of records, I couldn’t just import the data manually. So after much fixing, the problem was solved by following the steps below:

  1. Go to the Import tab
  2. Browse and select your CSV file
  3. Instead of the “CSV” format, select “CSV using LOAD DATA”
  4. In the “Fields terminated by” field, change “;” to “,”
  5. Ensure that “Use LOCAL keyword” is selected
  6. Click on “Go”

And that’s it! Your CSV data should be imported without any problems now.

, , , , , , , , ,

About Site Fixit!

Sam is a professional web designer and web developer. He has over 15 years of experience with web-related technologies, and loves making things work.

View all posts by Site Fixit!

One Response to “How To Fix “Invalid field count in csv input on line 1″ phpMyAdmin Error”

  1. Tranh Says:

    Thanks! it’s working perfectly!

    Reply

Leave a Reply