I'm trying to import about 20 .csv files into MySQL and I'm fed up with doing it via phpmyadmin's import gui.
Is there a way to do this by batch without typing on the command line? i.e. a script that will run when double clicked (Windows). What I want is:
- I have files like porsche.csv, ferrari.csv etc
- I want to import each of these into tables with the same name (i.e. porsche, ferrari)
- Empty the table before importing the text file (using
deleteflag). How does it handle new fields? - Ignore first line (header).
From what I've gathered so far: we use mysqlimport: http://dev.mysql.com/doc/refman/5.0/en/mysqlimport.html
I'll try to fiddle around with the options and see if I can get something working.