douluozhan4370 2015-04-20 10:24
浏览 190

如何在golang中连接mongodb 3.0

When I upgrade my mongodb server to version 3.0 from 2.6 it can't connect from golang use mgo.

I add 'authMechanism=SCRAM-SHA-1' in connection string, and it still can't connect to the server. The error that I get is SASL support not enabled during build (-tags sasl)

  • 写回答

2条回答 默认 最新

  • dongzhou4727 2015-04-30 03:31
    关注

    change server configurations:

    > var schema = db.system.version.findOne({"_id" : "authSchema"})
    > schema.currentVersion = 3
    > db.system.version.save(schema)

    https://jira.mongodb.org/browse/SERVER-17459

    评论

报告相同问题?