怎样向MongoDB中导入Json文件?
世界只因有你
世界只因有你 2017-05-02 09:21:04
0
1
540

怎样将Json文件导入到MongoDB数据库中?

> show dbs
admin  (empty)
ceshi  0.078GB
local  0.078GB
> use ceshi
switched to db ceshi
> show tables
ganji_info
ganji_uinfo
ganji_url_info
ganji_url_list
prices_list
sample_info
shouji_info
shouji_urls_list
system.indexes
url_list
> mongoimport -d ceshi -c sample_info e:\sample.json
2016-08-18T08:28:00.151+0800 SyntaxError: Unexpected identifier

我参考网上的说是这样做,但是老是出错,求大神告诉我怎么做?

世界只因有你
世界只因有你

reply all(1)
伊谢尔伦

Damn it, I just said that the more I read, the more something is wrong. I know why you made a mistake in the question. mongoimportThis command is not executed in the mongo shell!
This command must be executed independently

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template