使用mongo uri
-
uri = 'mongodb://{username}:{password}@{host}:{port}/{dbname}'
-
特殊情况
username和password含有"@"和":"时,将"@"和":"进行url编码.
@ ==> %40
: ==> %3a
uri = 'mongodb://{username}:{password}@{host}:{port}/{dbname}'
特殊情况
username和password含有"@"和":"时,将"@"和":"进行url编码.
@ ==> %40
: ==> %3a