Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mongorestore problem Authentication failed

Tags:

mongodb

mongorestore -h ds121312.mlab.com:21312 -d heroku_jzxndzbk -u heroku_jzxndzbk -p xxxxxxxxxxxxxxx  dump/Loc8r

Error:

2019-12-20T11:36:55.931-0500    error connecting to host: could not connect to server: connection() : auth error: sasl conversation error: unable to authenticate using mechanism "SCRA
M-SHA-1": (AuthenticationFailed) Authentication failed.

I am following along "Getting MEAN" text by Holmes/Harber - pg 152.

Any suggestions? Thank you

like image 981
A Crowe Avatar asked Dec 20 '19 16:12

A Crowe


1 Answers

You must also specify which database you are using for authentication, e.g., --authenticationDatabase admin.

Reference: https://docs.mongodb.com/manual/reference/program/mongo/#cmdoption-mongo-authenticationdatabase

like image 71
oxr463 Avatar answered Oct 20 '22 10:10

oxr463