If you want import a very BIG CSV file into your Mysql database on Linux (e.g. Ubuntu 12.04) you have to know that the default configuration of the deamond mysqld doesn’t allow the import of local files by default.
If you look into yhe Mysql documentation (you should Google on this page) you can se the manual of this command:
LOAD DATA LOCAL INFILE '/home/ema/Scrivania/2.txt' INTO TABLE `wh` FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' ;
And you’ll receive this error:
ERROR 1148 (42000): The used command is not allowed with this MySQL version
You can do this query with your terminal!
Open it and login at the Mysql console with this command:
mysql -u [your_user] -p[your_pass] --local-infile [your db_name]
Now, try again and the query will work!
I notify you that if you are 2/3G of CSV file mysql will be very very slow!
I’ve been waiting for two hours to import 30.000.000 of record.. and it was very boring!
Unfortunately, that is the sort of thing that happens.