无法导入mongodb [英] Cannot import mongodb

查看:117
本文介绍了无法导入mongodb的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试像这样导入mongo

I tried mongo import like this


  1. mongoimport -d test -c foo importfile.json

  2. mongoimport --host localhost --db local --collection讲师 - type json --file temp.json --headerline --upsert

  1. mongoimport -d test -c foo importfile.json
  2. mongoimport --host localhost --db local --collection lecturer --type json --file temp.json --headerline --upsert

我有同样的错误消息语法错误:缺少;在语句(shell)之前: 1
我的代码有什么问题&如果我的数据存储在C:\Documents和Settings \User\Desktop中,如何导入?请帮助,谢谢提前

and I've got same error message "Syntax Error: missing ; before statement (shell):1" what's wrong with my code & how to import if my data stored in C:\Documents and Settings\User\Desktop ?? please help, thank's in advance

推荐答案

mongoimport旨在在命令提示符下运行,而不是在mongo shell中运行。尝试退出shell并运行命令。

mongoimport is intended to run in command prompt and not in the mongo shell. Try exiting out of the shell and running the command.

这篇关于无法导入mongodb的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆