如何通过mongo shell连接到mLab上的MongoDB?
我正试图使用服务提供商提到的命令通过如何通过mongo shell连接到mLab上的MongoDB?,mongodb,shell,Mongodb,Shell,我正试图使用服务提供商提到的命令通过mongoshell连接到我在mLab上的数据库集群,但我不断收到提到missing“;”语句的相同错误。我可以通过mongoose客户端访问相同的数据库,没有任何问题 任何我搞砸的线索: mongo ds117956.mlab.com:17956/image_search -u <dbuser> -p <dbpassword> 2017-11-29T03:04:33.139+0530 E QUERY [thread1] Syn
mongo
shell连接到我在mLab上的数据库集群,但我不断收到提到missing“;”语句的相同错误。我可以通过mongoose客户端访问相同的数据库,没有任何问题
任何我搞砸的线索:
mongo ds117956.mlab.com:17956/image_search -u <dbuser> -p <dbpassword>
2017-11-29T03:04:33.139+0530 E QUERY [thread1] SyntaxError: missing ; before statement @(shell):1:6
mongods117956.mlab.com:17956/image\u search-u-p
2017-11-29T03:04:33.139+0530 E查询[thread1]语法错误:缺少;声明@(shell)之前:1:6
您需要从mongodb/bin运行
然后输入以下命令:mongods117956.mlab.com:17956/image\u search-u-p
不是来自mongo本身
mongods117956.mlab.com:17956/image_search-u-p
您刚才问了这个问题,但根据错误消息,您似乎试图在
mongo
shell中运行命令,而不是在命令行shell中运行命令(例如Linux上的bash
,或Windows上的cmd.exe
)。