凯发k8国际娱乐官网入口-k8凯发> 文档数据库服务 dds> > 连接失败,提示:authentication failed
更新时间:2023-06-14 gmt 08:00

连接失败,提示:authentication failed-凯发k8国际娱乐官网入口

问题描述

使用如下命令连接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 重置密码
分享:
网站地图