From fda6cd5354f8c8cbde808b94cd38d7e93c9fcb0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98hanzhixiao=E2=80=99?= <‘709674996@qq.com’> Date: Thu, 13 Jul 2023 18:30:18 +0800 Subject: [PATCH 1/2] fix conflict MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ‘hanzhixiao’ <‘709674996@qq.com’> --- config/config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/config.yaml b/config/config.yaml index cbbcf9e18..bf52f845b 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -23,7 +23,7 @@ zookeeper: password: #密码 mysql: - address: [ 127.0.0.1:3306 ] #目前仅支持单机 + address: [ 127.0.0.1:13306 ] #目前仅支持单机 username: root #用户名 password: #密码 database: openIM_v3 #不建议修改 @@ -42,7 +42,7 @@ mongo: maxPoolSize: 100 redis: - address: [ 127.0.0.1:6379 ] # + address: [ 127.0.0.1:16379 ] # username: #only redis version 6.0+ need username password: openIM123 #密码 From 4bd97149c30b805717e1d6018919ed12eddf34dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98hanzhixiao=E2=80=99?= <‘709674996@qq.com’> Date: Thu, 13 Jul 2023 18:37:59 +0800 Subject: [PATCH 2/2] fix conflict MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: ‘hanzhixiao’ <‘709674996@qq.com’> --- cmd/openim-api/main.go | 1 - config/config.yaml | 2 +- pkg/common/cmd/rpc.go | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/cmd/openim-api/main.go b/cmd/openim-api/main.go index c91445388..b80460990 100644 --- a/cmd/openim-api/main.go +++ b/cmd/openim-api/main.go @@ -56,7 +56,6 @@ func startPprof() { } func run(port int) error { - port = 10002 if port == 0 { return fmt.Errorf("port is empty") } diff --git a/config/config.yaml b/config/config.yaml index bf52f845b..07d46957e 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -25,7 +25,7 @@ zookeeper: mysql: address: [ 127.0.0.1:13306 ] #目前仅支持单机 username: root #用户名 - password: #密码 + password: openIM123 #密码 database: openIM_v3 #不建议修改 maxOpenConn: 1000 #最大连接数 maxIdleConn: 100 #最大空闲连接数 diff --git a/pkg/common/cmd/rpc.go b/pkg/common/cmd/rpc.go index 0c94b2b78..239858764 100644 --- a/pkg/common/cmd/rpc.go +++ b/pkg/common/cmd/rpc.go @@ -45,7 +45,6 @@ func (a *RpcCmd) StartSvr( name string, rpcFn func(discov discoveryregistry.SvcDiscoveryRegistry, server *grpc.Server) error, ) error { - a.port = 10030 if a.GetPortFlag() == 0 { return errors.New("port is required") }