2015-08-08 90 views
0

當我通過命令提示符mongoexport意外標識符

'C:\Program' is not recognized as an internal or external command, 
operable program or batch file. 

C:\WINDOWS\system32>mongo 
2015-08-08T22:21:06.874+0530 I CONTROL Hotfix KB2731284 or later update is inst 
alled, no need to zero-out data files 
MongoDB shell version: 3.0.4 
connecting to: test 

> use mydb 
switched to db mydb 

> db.getCollectionNames() 
[ "movie", "student", "system.indexes" ] 

> mongoexport --db mydb --collection movie --out movie.json 
2015-08-08T22:22:58.897+0530 E QUERY SyntaxError: Unexpected identifier 

> my_path: c:/Program Files/MongoDB/Server/3.0/bin "mongoexport -d mydb -c stude 
nt" 
2015-08-08T22:40:27.622+0530 E QUERY SyntaxError: Unexpected string 

執行MongoDB的導出查詢爲什麼我不能夠執行mongoimport/mongoexport?的回答

+0

但你也只是問'-c stude nt'當這本來應該是'-c student'因此錯誤的確切描述。 –

+0

感謝布雷克對於儘快回覆 my_path:C:/ Program Files/MongoDB/Server/3.0/bin「mongoexport -d mydb -c student」 015-08-08T23:42:54.182 + 0530 E QUERY SyntaxError:意外的字符串 但仍然相同的錯誤 –

+0

對不起,你沒有在這裏講完整個事實。這個錯誤是由於就像你最初發布的那樣,你創建了意想不到的參數。所以如果你仍然得到錯誤,你仍然在做這件事。請再次閱讀手冊頁面,並按照示例進行操作。 –

回答