文档首页> 文档数据库服务 DDS> 故障排除> 连接失败,提示:Authentication failed
更新时间:2023-06-14 GMT+08:00
分享

连接失败,提示:Authentication failed

问题描述

使用如下命令连接DDS实例时报错。

mongo --host 192.168.168.116 --port 8635 -u rwuser -p xxxxxxxxx --authenticationDatabase admin --ssl --sslCAFile /root/ca.crt --sslAllowInvalidHostnames

报错信息如下:

MongoDB shell version v3.4.17
connecting to: mongodb://192.168.168.116:8635/
2019-09-19T09:39:24.306+0800 W NETWORK  [thread1] The server certificate does not match the host name. Hostname: 192.168.168.116 does not match CN: 172.16.2.65
MongoDB server version: 4.0.3
WARNING: shell and server versions do not match
2019-09-19T09:39:24.329+0800 E QUERY    [thread1] Error: Authentication failed. :
DB.prototype._authOrThrow@src/mongo/shell/db.js:1461:20
@(auth):6:1
@(auth):1:2
exception: login failed

可能原因

连接DDS实例时需要输入管理员密码,管理员密码输入错误提示“Authentication failed”。

排查思路

检查连接DDS实例的命令中管理员的密码是否正确。

处理方法

  • 请重新输入正确的管理员密码。
  • 如果您忘记了密码,可以单击实例名称,在基本信息页面,单击数据库信息 > 管理员账户名后面的“重置密码”,通过DDS控制台重置密码。
    图1 重置密码
分享:

    相关文档

    相关产品