Problem description
The special characters cannot be recognized when you connect to an ApsaraDB for MongoDB instance by using the mongo shell or program code and if the password in the connection string of the instance contains special characters. As a result, the instance is not connected. Special characters include ! @ # $ % ^ & * ( ) _ + =
Solution
You must escape the special characters in the password in the cconnection string based on the following escape rules.
! : %21
@ : %40
# : %23
$ : %24
% : %25
^ : %5e
& : %26
* : %2a
( : %28
) : %29
_ : %5f
+ : %2b
= : %3d
For example, if the password is ab@#c
, escaped characters of the password are ab%40%23c
in the connection string.