Mongodb导入本地数据(.dat)到仓库(window)

借鉴文章,完成了数据文件导入到Mongodb,

尊重作者版权:https://blog.csdn.net/weixin_44198965/article/details/100022616

1、找到你MongoDB的安装路径

2、cmd 到此路径下 

3、导入数据

4、mongoimport -d dbs -c topsearches E:\dbs\topsearches.dat

注解:

dbs 为你的数据库名;

topsearches 为你的数据表,在MongDB中称为集合;

E:\dbs\topsearches.dat 这个是你.dat 数据文件 路径;

建议不要使用中文路径,我是直接拷贝到E盘根目录下导入成功的。

数据库中数据都有了,大家加油!

 

 

 

posted @ 2019-12-25 10:29  suni1024  阅读(666)  评论(0编辑  收藏  举报