Connect to mongodb using shell

421 views
Skip to first unread message

mel...@tecgraf.puc-rio.br

unread,
Sep 13, 2018, 4:10:41 PM9/13/18
to NodeChef
Hi

I have a meteor application hosted in nodechef.
I'd like to connect to mongodb using (external) mongo shell.

$ mongo DBHOST:PORT -u DBUSER -p
MongoDB shell version v3.4.4
Enter password: MYPASSWORD
connecting to: DBHOST:PORT
MongoDB server version: 3.0.11
WARNING: shell and server versions do not match
2018-09-13T16:44:58.812-0300 E QUERY    [thread1] Error: Authentication failed. :
DB.prototype._authOrThrow@src/mongo/shell/db.js:1459:20
@(auth):6:1
@(auth):1:2
exception: login failed

OR
USING the Database connection string from the dashboard - task manager - dbactions - Database Connect.

$ mongo --host mongodb://DBUSER:MYPASSWORD@DBHOST:PORT/DBNAME
bash: syntax error near unexpected token `)'

It seems that my login has failed, but I'm using the password and all information that I've read on dashboard - task manager - dbactions - Database Connect.

Any suggestion, please ?

Thanks in advance
Melissa


in...@nodechef.com

unread,
Sep 13, 2018, 9:17:11 PM9/13/18
to NodeChef
We provide documentation on how to connect to Mongo Shell found here:


Hope this helps.

mel...@tecgraf.puc-rio.br

unread,
Sep 14, 2018, 9:59:30 AM9/14/18
to NodeChef
Thank you.
I've changed my password and it worked !
Reply all
Reply to author
Forward
0 new messages