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
I've modified Tom's script to solve few issues that faced
#!/bin/bash
for f in *.csv
do
mysql -e "load data local infile '"$f"' into table myTable fields TERMINATED BY ',' LINES TERMINATED BY '\n'" -u myUser--password=myPassword fmeter --local-infile
done
load data local infile instead of load data infile : [file to be loaded was local to mysql server]--local-infile to enabled local data load mode on client.