mongodb-error validating settings: only one positional argument is allowed

前端 未结 6 1883
孤独总比滥情好
孤独总比滥情好 2021-02-08 09:35

I just moved to a new laptop which had mongo 3.0.0 I believe. On the new laptop I have mongo 3.0.4. and trying the script that was working on the old laptop is giving me errors

6条回答
  •  孤独总比滥情好
    2021-02-08 10:22

    Just a wild guess...

    ... but the various long options should be specified using --, not -:

    mongoimport --host localhost \
                --db roudy123_q \
                --collection LebaneseAmericanUniversity\(Lebanon\).json \
                --file LebaneseAmericanUniversity\(Lebanon\).json \
                --jsonArray
    

    Maybe this particular version of mongoimport is more punctilious about that, and will treat -db ... -collection ... as positional arguments rather than keyword arguments ?

提交回复
热议问题