server returned error on SASL authentication step: Authentication failed

后端 未结 7 1344
死守一世寂寞
死守一世寂寞 2020-12-12 20:14

The following is my MongoDB connection dial from GoLang. But it\'s returning a panic \"server returned error on SASL authentication step: Authentication failed.\".

7条回答
  •  春和景丽
    2020-12-12 20:56

    I got my answer from this link: https://newbiedba.wordpress.com/2016/11/21/mongodb-3-2-server-returned-error-on-sasl-authentication-step-authentication-failed/

    Except for all answers above, the only unmentioned reason is that my password has a special character '$' in it. I think this is a very common practice to have special characters and this may trip many without this simple tip:

    When using command line mongo/mongostat/etc.. Single quote your username or password that has special characters!

提交回复
热议问题