JavaScript execution failed connected to mongoHQ shell

后端 未结 2 875
-上瘾入骨i
-上瘾入骨i 2021-01-17 10:54

Trying to access MongoHQ directly:

> mongo mongodb://heroku:mypassword@alex.mongohq.com:10046/myapp
MongoDB shell version: 2.4.3
connecting to: mongodb://         


        
2条回答
  •  被撕碎了的回忆
    2021-01-17 11:18

    This is a shell bug and it's not a new one. Basically the mongo shell doesn't accept the same format of connection string that regular mongodb drivers do. I can reproduce this error in the current and previous versions and this syntax isn't expected to work (though it probably shouldn't crash either, but there is already a bug for the shell to accept standard connection string: jira.mongodb.org/browse/SERVER-3254

    Meanwhile you can connect by using the mongo shell options such as

    mongo -u  -p  hostIP:port/db 
    

    or

    mongo --host host --port port [ other options ] db
    

提交回复
热议问题