From 541ccda7541ade33bc2095d6cc2933f71cdc72b5 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Wed, 23 Feb 2022 14:30:21 +0800 Subject: [PATCH] test mongo driver --- pkg/common/db/model.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/common/db/model.go b/pkg/common/db/model.go index eb08d37da..0576e6286 100644 --- a/pkg/common/db/model.go +++ b/pkg/common/db/model.go @@ -41,9 +41,8 @@ func init() { initMysqlDB() // mongo init // "mongodb://sysop:moon@localhost/records" - uri := "mongodb://user:pass@sample.host:27017/?maxPoolSize=20&w=majority" - uri = fmt.Sprintf("mongodb://%s:%s@%s/%s/?maxPoolSize=%d", - config.Config.Mongo.DBUserName, config.Config.Mongo.DBPassword, + uri := "mongodb://sample.host:27017/?maxPoolSize=20&w=majority" + uri = fmt.Sprintf("mongodb://%s/%s/?maxPoolSize=%d", config.Config.Mongo.DBAddress[0],config.Config.Mongo.DBDatabase, config.Config.Mongo.DBMaxPoolSize)