If the username or password contains a colon (:) or an at-sign (@) then it must be urlencoded

If the username or password contains a colon (😃 or an at-sign (@) then it must be urlencoded

image-20201014153744386

错误 原因连接mongoDB 的url 中 用户名 或密码出现了 @ 或 : 符号

url 中原本就带有 @ 和 : 用户名 或密码 再出现 这两个字符时就无法区分哪个是真正的分隔符

解决办法:

对@使用16进制进行URL编码:%40

对:使用16进制进行URL编码:%3A

用上面16进制的URL编码代替原本的字符就行了

posted @ 2020-10-14 15:47  天宇轩-王  阅读(605)  评论(0编辑  收藏  举报