MongoDB SyntaxError: missing ; before statement @(shell)

后端 未结 3 805
自闭症患者
自闭症患者 2020-12-15 04:13

When I try to invoke methods of a collection, why is there an error of SyntaxError: missing ; before statement @(shell)? Thanks.

$ mongo
MongoDB         


        
相关标签:
3条回答
  • 2020-12-15 04:58

    According to documentation

    Collection names should begin with an underscore or a letter character

    Check here or here how to remove or access your wrongly named collection.

    0 讨论(0)
  • 2020-12-15 05:07

    You have to open new cmd and run as administrator then write mongoexport. It worked in my mongoDB

    0 讨论(0)
  • 2020-12-15 05:12

    exit from mongoshell with quit() and try to run command in regular command prompt, it will work

    0 讨论(0)
提交回复
热议问题