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盘根目录下导入成功的。

扫描二维码关注公众号,回复: 8306502 查看本文章

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

 

猜你喜欢

转载自www.cnblogs.com/suni1024/p/12095290.html