Something pretty straight forward..
if i have a csv as shown below
to import to mysql
1) go to the directory of the csv file. e.g. words.csv
“airy”
“amused”
“animated”
“beatific”
“blissful”
“blithe”
“bright”
“brisk”
“buoyant”
“cheerful”
3) go into mysql admin
mysql -u root -p
4) run command
>LOAD DATA INFILE “./words.csv” INTO TABLE happy FIELDS TERMINATED BY “,” OPTIONALLY ENCLOSED BY “”"” TERMINATED BY ‘\n’;
the words.csv is saved under /var/lib/mysql.
5) and its done.
mysql> select * from happy;
+—————-+
| name          |
+—————-+
| airy               |
| amused       |
| animated     |
| beatific        |
| blissful          |
| blithe            |
| bright           |
VN:F [1.9.6_1107]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.6_1107]