当前位置:Gxlcms > 数据库问题 > 从MySQL中导入数据到MongoDB中

从MySQL中导入数据到MongoDB中

时间:2021-07-01 10:21:17 帮助过:49人阅读

field1,field2,...,fieldn from TABLE into outfile /test.csv fields terminated by , optionally enclosed by "" escaped by "" lines terminated by \r\n;

将test.csv数据导入到mongodb中,本人使用的是mongodb-3.2

mongoimport -h "localhost" -d "DATABASE" -c "COLLECTION" -f "field1,field2,...fieldn" --type csv -file "c:\test.csv"

注意:我在在type前有两个“-”号,使用一个“-”会报错







从MySQL中导入数据到MongoDB中

标签:nat   type   ...   lin   blog   mongo   导入数据   local   port   

人气教程排行