MongoDB 3.0 导入命令

在MongoDB的bin目录下执行

./mongoimport -h 192.168.77.129 --db test --collection restaurants --drop --file /usr/local/mongodb-linux-x86_64-3.0.6/DW_LABEL_DATAS_1_0.csv

还有些参数没有加上~ 需要的话可以加上~ 通过 mongoimport --help命令查找你需要的命令哦~不过要注意的是 csv里的文件格式要是Json格式哦~

我也觉得很变态。。。

原文地址:https://www.cnblogs.com/yangsy0915/p/4923605.html