Closed xuxiaoyuspallow closed 6 years ago
Assume that the auth of admin database is("user","pwd"),and when I connected the server using the url mongodb://user:pwd@ip:port/local,it would't work.How can i fix it?
mongodb://user:pwd@ip:port/local
well, i fix this by adding the authSource to url: mongodb://user:pwd@ip:port/local?authSource=admin
mongodb://user:pwd@ip:port/local?authSource=admin
Assume that the auth of admin database is("user","pwd"),and when I connected the server using the url
mongodb://user:pwd@ip:port/local
,it would't work.How can i fix it?