server returned error on SASL authentication step: Authentication failed

I faced similar error and added --authenticationDatabase parameter and it worked while we connecting to a remote MongoDB

Use the similar below format in your code :

$mongorestore --host databasehost:98761 --username restoreuser
--password restorepwd --authenticationDatabase admin --db targetdb ./path/to/dump/

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)