sheharyarn / mongo-sync

Sync Remote and Local MongoDB Databases :fire:
https://sheharyar.me/blog/sync-mongodb-local-and-production-heroku/
322 stars 90 forks source link

error on SASL authentication step: Authentication failed #24

Open cedricve opened 6 years ago

cedricve commented 6 years ago

Great tool however I'm receiving an error while trying to copy a remote database to a local database (which has credentials).

 ./mongo-sync pull

Server returned error on SASL authentication step: Authentication failed.

Is there a way to specify the --authenticationDatabase

Mongo-Sync Configurations

 local:
      db: 'x'
      host:
      port: x
     access:
          username: 'x'
          password: 'x'

 remote:
       db: 'x'
      host:
     url: 'x'
     port: x

 tunnel:
       on: false
       access:
       username: 'root'
       port: 22
sheharyarn commented 6 years ago

Hey @cedricve!

There was a PR for this, but in the interest of keeping things simple, I decided to not merge. But now I see that multiple people are requesting this.

Can you try out this fork and report back? If everything works as expected for you, I can merge this in to master.

easydrops commented 5 years ago

I had the same problem and it worked with your fork. I would recommend merging it. Thanks for the tool 👍