Lea
Lea

Reputation: 934

CSV to MySQL conversion and import

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?

Upvotes: 1

Views: 1119

Answers (1)

Bill Karwin
Bill Karwin

Reputation: 562330

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.

Upvotes: 3

Related Questions