1
votes

i am trying to import my database to my mongoLab database, but it keep showing the following error:

2016-10-19T21:05:49.183+0800    Failed: error connecting to db server: server returned error on SASL authentication step: Authentication failed.
-bash: vd: command not found

This is how I ran my command:

mongorestore -h 243253423.mlab.com:2131242 -d meteor -u <Username> -p <Password> /Users/directory/desktop/mongo/dump
1
Are you using the correct database user credentials (not to be confused with mLab account credentials)? If so, mLab support can help you pinpoint the issue: [email protected] - pneumee
@pneumee yes, and doing so, I will contact them now, thanks - Behrouz Riahi
Are you able to connect using mongo shell? - andresk
@andresk yes I am able to connect to mongo shell - Behrouz Riahi
You may need to include --authenticationDatabase admin flag possibly? - Vince Bowdren

1 Answers

0
votes

I ran across this error message and I am not sure this was your specific problem but this ended up working for me

mongorestore -d production-db \
   -u myusername -p MyPassword \
   --authenticationDatabase admin --host mydomain.com \
   ~/tmp/mongodump/local-production-db/

(be sure to check firewall sudo ufw status and net.bindIp sudo nano /etc/mongod.conf to confirm that you have access and your mongo process is listening on an external port)