1

Im working on a large project, havent had to do what I need help with before. I have a csv file, it contains a large amount of data, namely all of the cities, towns, suburbs in Australia. I need to convert the csv file to sql for mysql, and then import it into the database.

What would be the best way to achieve this?

Jeff LaFay
  • 12,882
  • 13
  • 71
  • 101
Lea
  • 934
  • 9
  • 17
  • 34

1 Answers1

3

Use LOAD DATA INFILE or the equivalent command-line tool mysqlimport.

These are easy to use for loading CSV data, and this method runs 20x faster than importing rows one at a time with SQL.

Bill Karwin
  • 538,548
  • 86
  • 673
  • 828