The full response is {"ok": 0.0, "errmsg": "Authentication failed.", "code": 18, "codeName": "AuthenticationFailed"}
时间: 2023-08-22 11:05:40 浏览: 246
这个异常信息是由于身份验证失败导致的。根据引用和引用中的异常描述,可以看出在连接MongoDB时出现了身份验证失败的问题。根据引用中的配置信息,可以看到用户名和密码是正确的,但是认证的数据库配置错误,应该是将认证的数据库设置为了admin,而实际上账号密码信息在admin库里。所以需要将authentication-database的值改为正确的数据库名称(可能是mini),以便正确进行身份验证。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [{ "ok" : 0.0, "errmsg" : "Authentication failed.", "code" : 18, "codeName" : "AuthenticationFailed](https://blog.csdn.net/qq_42815754/article/details/90374403)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [‘Authentication failed.‘ on server xx.xx.xxx.x:... The full response is { “ok“ : 0.0, “errmsg](https://blog.csdn.net/qq_42025798/article/details/114417527)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [MongoDB-Springboot配置MongoDB碰到的问题](https://blog.csdn.net/qq_39595769/article/details/120043844)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文