无法导入 mongodb [英] Cannot import mongodb

查看:26
本文介绍了无法导入 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

并且我收到了相同的错误消息语法错误:缺少;在语句(shell):1之前"我的代码有什么问题 &如果我的数据存储在 C:Documents and SettingsUserDesktop 中,如何导入?请帮忙,提前致谢

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 SettingsUserDesktop ?? 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天全站免登陆