Is there a way to import multiple csv files at the same time into a MySQL database? Some sort of batch import?
I\'m on Mac OSX running a MAMP server.
I have
There's a little PHP script for you:
#!/usr/bin/php
mysql_connect('localhost','root','root'); // MAMP defaults
mysql_select_db('yourdatabase');
$files = glob('*.csv');
foreach($files as $file){
mysql_query("LOAD DATA INFILE '".$file."' INTO TABLE yourtable");
}
See the MySQL Manual for LOAD DATA INFILE options which fit your documents.