问题描述
创建MongoDB实例后,复制实例中的连接地址信息,使用 mongo 原生客户端连接数据时报错。
具体报错信息如下:
FailedToParse: Password must be URL Encoded for mongodb:// URL: mongodb://连接地址信息
```
`
# 解决方案
因为MongoDB对用户名或者密码中包含以下特殊字符,需要做 URL 编码。
将密码中的字符串url编码后重新连接:
````undefined
If the username or password includes the following characters:
: / ? # [ ] @
```
`
# 参考文档
[1] [https://docs.mongodb.com/manual/reference/connection-string/#examples](https://docs.mongodb.com/manual/reference/connection-string/#examples)
[2][https://www.url-encode-decode.com/](https://www.url-encode-decode.com/)
**如果您有其他问题,欢迎您联系火山引擎**[技术支持服务](https://console.volcengine.com/ticket/createTicketV2/)