A simple thing - populating MySQL automatically from CSV using MySQL utilities turned out to be quite a challenge. The fix was surprisingly simple
http://stackoverflow.com/posts/23631708/edit
1. Create the table
2. login to MySQL shell
3. Execute the command :
LOAD DATA LOCAL INFILE '/tmp/gold_standard.csv' INTO TABLE <SomeTable> FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' IGNORE 1 LINES;
4. Before executing line 3, ensure that the file:sudo vi /etc/mysql/my.cnf has been updated and the following lines have been appended:
http://www.erwaysoftware.com/blog/mysql-external-drive/
http://stackoverflow.com/posts/23631708/edit
1. Create the table
2. login to MySQL shell
3. Execute the command :
LOAD DATA LOCAL INFILE '/tmp/gold_standard.csv' INTO TABLE <SomeTable> FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n' IGNORE 1 LINES;
4. Before executing line 3, ensure that the file:sudo vi /etc/mysql/my.cnf has been updated and the following lines have been appended:
[mysqld]
local-infile
[mysql]
local-infile
5. Sometimes you might want to add an extra hard drive volume which might be a physical or virtual volume and point the MySQL instance to read and write to this extended volume. On Ubuntu 12.04 there are a few steps to be followed which are not very clearly defined unless on trawls a few blogs. Luckily I found a blog which collates all this information in one place:http://www.erwaysoftware.com/blog/mysql-external-drive/