golang 连接 mongodb dial 报错 server returned error on SASL authentication step: Authencication failed.
来源:互联网 发布:期货1分钟数据 编辑:程序博客网 时间:2024/05/19 18:11
问题:server returned error on SASL authentication step: Authencication failed.
思路:解决这个问题,要看go语言的文档https://godoc.org/gopkg.in/mgo.v2#Dial
The username and password provided in the URL will be used to authenticate into the database named after the slash at the end of the host names, or into the "admin" database if none is provided. The authentication information will persist in sessions obtained through the New method as well.
在URL中提供的用户名和密码将被用来对名为“斜杠”的数据库进行认证,如果没有提供的话,将被命名为“admin”数据库。验证信息将坚持通过新方法获得的会话以及。
原来是配置的问题:
"mongoAddr": "username:password@port/databasename",
这里要把/databasename加上,否则默认的数据库是 admin,导致SASL鉴权失败。
0 0
- golang 连接 mongodb dial 报错 server returned error on SASL authentication step: Authencication failed.
- Failed: error connecting to db server: server returned error on SASL authentication step: Authentica
- SMTP server rejected auth: 535 Error: authentication failed Gerrit 认证邮箱报错
- java代码连MongoDb报错 authentication failed
- SASL LOGIN authentication failed: authentication failure
- 关于发邮件报错535 Error:authentication failed解决方法
- 关于发邮件报错535 Error:authentication failed解决方法
- 163邮箱报错: 535 Error: authentication failed
- 关于发邮件报错535 Error:authentication failed解决方法
- HttpWebRequest The remote server returned an error: (407) Proxy Authentication
- mongodb 报错:Query failed with error code 13 and error message 'not authorized for query on ..."
- SASL authentication failed using mechanism DIGEST-MD5
- SASL authentication DIGEST-MD5 failed解决办法
- navicat连接oracle报错ORA-28547:connection to server failed,probable Oracle Net admin error
- Error from server: error dialing backend: dial tcp: lookup xxx on 114.114.114.114:53: no such
- 解决Java连接MongoDB数据库"Authentication failed"问题
- 单点登录(十)-----遇到问题-----cas启用mongodb验证方式报错com.mongodb.CommandFailureException---Authentication failed
- LDAP报错:0: NO "authentication failed"
- 3天烧脑式DevOps培训课程 (南京站) 即将召开!
- OpenCV 例子代码的讲解、简介及库的安装
- 一个公式来说明加接圈的作用和缺点
- 大学两年读了大概 200 本书,为什么感觉读书的价值还是没有体现出来?
- 调整数组使奇数全部都位于偶数前面。
- golang 连接 mongodb dial 报错 server returned error on SASL authentication step: Authencication failed.
- softmax_loss,Inner Product,accuracy,reshape和dropout层及其参数配置。
- Mac OS X - Reset MySQL Root Password
- Java GC 分代收集算法
- Ubuntu定时执行任务---cron
- Android Studio Duplicate files copied in APK
- Mac平台安装mysql-connector-python
- IEEE所有标准主页、IETF 6TiSCH主页、中科院信工所和物联网标准等
- startActivityForResult的用法